Method: Redis::Commands::Streams#xlen

Defined in:
lib/redis/commands/streams.rb

#xlen(key) ⇒ Integer

Returns the number of entries inside a stream.

Examples:

With key

redis.xlen('mystream')

Parameters:

  • key (String)

    the stream key

Returns:

  • (Integer)

    the number of entries



172
173
174
# File 'lib/redis/commands/streams.rb', line 172

def xlen(key)
  send_command([:xlen, key])
end