redis Size of a List


Example

The size of a Redis list can be deterimed using the LLEN command. If I have a four element list stored at the key my_list, I can get the size using:

LLEN my_list

which will return 4.

If a user specifies a key that doesn't exist to LLEN, it will return a zero, but if a key is used that points to an item of a different datatype, an error will be returned.