XTRIMTrim a stream by length or minimum ID.
| Syntax | XTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count] |
| Group | stream |
| Arity | -4 |
| Since | 1.0.0 |
| Flags | write |
| Complexity | O(R log N + N*F) for R evicted entries |
| Redis compatibility | 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 |