Redis Rpop Command
The Redis Rpop command is used to remove the last element of the list; 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 Version
= 1.0.0
Return Value
The removed element.
Returns nil when the list does not exist.
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>
Redis List