修改本页
Redis

RPOP key

Removes and returns the last element of the list stored at key.

返回值

Bulk string reply: the value of the last element, or nil when key does not exist.

例子

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> 
Comments powered by Disqus