XTRIMTrim a stream by length or minimum ID.
| 语法 | XTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count] |
| 分组 | stream |
| 参数个数 | -4 |
| 起始版本 | 1.0.0 |
| 标志 | write |
| 复杂度 | O(R log N + N*F) for R evicted entries |
| Redis 兼容性 | differs: answers as valkey 9.1 does, an approximate '~' trim removing only whole nodes as XADD's does; Redis 8.10's KEEPREF / DELREF / ACKED options are not parsed |