XLEN

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

Return the number of stream entries (IDs)

Usage: XLEN key.

Example

Command>XLEN sensor-1234
Result>(integer) 2
Returns 0 even if the key does not exist. Use EXISTS to check whether the key is present.

Syntax

XLEN key

  • Available since version 5.0.0.
  • Time complexity is O(1).

<< XADDS XLEN XRANGE >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.