Redis Rpop Command
The Redis Rpop command is used to remove the last element of a list, and the return value is the removed element.
Syntax
The basic syntax of the Redis Rpop command is as follows:
redis 127.0.0.1:6379> RPOP KEY_NAME
Available Versions
>= 1.0.0
Return Value
The removed element.
When the list does not exist, nil is returned.
Example
redis> RPUSH mylist "one" (integer) 1 redis> RPUSH mylist "two" (integer) 2 redis> RPUSH mylist "three" (integer) 3 redis> RPOP mylist "three" redis> LRANGE mylist 0 -1 1) "one" 2) "two" redis>Other Extensions
Redis Lists