XADDAppend an entry to a stream, with optional trim.
| 语法 | XADD key [NOMKSTREAM] [MAXLEN [=|~] threshold | MINID [=|~] id] id|* field value [field value ...] |
| 分组 | stream |
| 参数个数 | -5 |
| 起始版本 | 1.0.0 |
| 标志 | write |
| 复杂度 | O(log N) to insert; O(N*F) whenever a MAXLEN / MINID clause actually evicts, because the trim triggers a full weight recompute |
| Redis 兼容性 | differs: the approximate-trim '~' is accepted for wire compatibility but always trims exactly, and the LIMIT clause is not parsed |