Module Hub Beta

LPOPRPUSH

srclist dstlist

Pops an element from the head of srclist and pushes it to the tail of dstlist.

Return Value

Bulk string reply: the element being popped and pushed.

Examples

redis> LPUSH mylist one
(integer) 1
redis> LPUSH mylist two
(integer) 2
redis> LPUSH mylist three
(integer) 3
redis> LPOPRPUSH mylist myotherlist
“three”
redis> LRANGE mylist 0 -1
1) “two”
2) “one”
redis> LRANGE myotherlist 0 -1
1) “three”

© 2017 Redis Labs, Inc. All rights reserved.