Learn R Programming

rredis (version 1.6.9)

redisLLen: Redis list length.

Description

Return the length of the Redis list associated with the specified key.

Usage

redisLLen(key)

Arguments

key
The key to look up.

Value

  • The length if the list.

Details

Returns the length of the Redis list associated with key. If the key is not found, or if the list is empty, 0 is returned. If the key is associated with a value of type other than 'list,' an error is thrown.

References

http://redis.io/commands

See Also

redisBRpop

Examples

Run this code
redisConnect()
redisLPush('list',1)
redisLPush('list',2)
redisLPush('list',3)
redisLLen('list')

Run the code above in your browser using DataLab