Module Hub Beta


key count

Removes and return multiple elements from the start of a list stored in key.

If less than count elements are available, it pops as many as possible.

Return Value

Array reply: list of elements removed.


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

© 2017 Redis Labs, Inc. All rights reserved.