Database / REDIS
Explain LPUSH command in REDIS.
LPUSH inserts all the specified values at the head of the list stored at key. If the key does not exist, it is created as an empty list before performing the push operations. When key holds a value that is not a list, an error is returned.
Usage: LPUSH key value [value ...]
redis> LPUSH mylist "World" (integer) 1 redis> LPUSH mylist "Hello" (integer) 2 redis> LRANGE mylist 0 -1 1) "Hello" 2) "World" redis>
More Related questions...