kevy4.0

XTRIM

Trim a stream by length or minimum ID.

XTRIM key MAXLEN|MINID [=|~] threshold
Group
Stream
Since
1.0.0
Arity
at least 4
Flags
write

Complexity

O(R log N + N*F) for R evicted entries

Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.

Redis compatibility

Differs

'~' is accepted but trimming is always exact, LIMIT is not parsed, and trailing tokens after the threshold are silently ignored instead of erroring

See also

XACKXADDXAUTOCLAIMXCLAIMXDELXGROUPXINFOXLENXPENDINGXRANGEXREADXREADGROUPXREVRANGEXSETID

← All commands