LPUSH
Since 1.1.0Lists
Syntax
LPUSH key value [value ...]Adds values to the head (left) of the list at key, one after another, so the last value given ends up first. A missing key is created.
Reply
- The length of the list afterwards.
- A
WRONGTYPEerror if the key is not a list.
Examples
> RPUSH l a b c
(integer) 3
> LPUSH l z
(integer) 4
> LRANGE l 0 -1
1) "z"
2) "a"
3) "b"
4) "c"