XREVRANGE

Since 1.1.0Streams

Syntax

XREVRANGE key end start [COUNT count]
  • Flags: readonly
  • ACL categories: @read, @slow, @stream
  • Arity: -4

XRANGE, newest first; end comes first.

Examples

> XADD s 1-0 t 1
"1-0"
> XADD s 2-0 t 2
"2-0"
> XREVRANGE s + - COUNT 1
1) 1) "2-0"
   2) 1) "t"
      2) "2"