Redis Lists: LLEN
LLEN key
Redis LLEN command returns the length of the list stored at key. If a key does not exist, it is interpreted as an empty list and 0 is returned. An error is returned when the value stored at key is not a list.
Syntax:
LLEN KEY_NAME
Available since
1.0.0.
Return Value
Integer replies the length of the list at a key.
Return Value Type
Integer
Example: Redis LLEN
127.0.0.1:6379> LPUSH mycolor1 white black red blue (integer) 4 127.0.0.1:6379> LRANGE mycolor1 0 -1 1) "blue" 2) "red" 3) "black" 4) "white" 127.0.0.1:6379> LLEN mycolor1 (integer) 4
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework