rpoplpush命令
Redis rpoplpush
,命令用于移除列表的最后一个元素,并将该元素添加到另一个列表并返回。
语法
rpoplpush source destination
返回值
被移除的元素
例子
127.0.0.1:6379> rpush test:list 1 2 3 4
(integer) 4
127.0.0.1:6379> rpoplpush test:list destination
"4"
127.0.0.1:6379> lrange destination 0 -1
1) "4"