Learn R Programming

rredis (version 1.7.0)

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

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
## Not run: 
# redisConnect()
# redisLPush('list',1)
# redisLPush('list',2)
# redisLPush('list',3)
# redisLLen('list')
# ## End(Not run)

Run the code above in your browser using DataLab