redis RPOP command
Translation results:
pop
UK[pɒp] US[pɑ:p]
vi. (unexpectedly, suddenly) appear; appear suddenly; make a popping sound; (suddenly) action
vt. (suddenly) reach out; (suddenly) ask a question; (suddenly take out something prepared); strike
n.pop music ; soda; (especially used as a title) dad; (quickly marked)
adj. pop music; popular style; popular; modern
adv. explosion; bang
abbr.post office protocol
Third person singular: pops Plural: pops Present participle: popping Past tense: popped Past participle: popped
redis RPOP commandsyntax
Function: Remove and return the tail element of the list key.
Syntax: RPOP key
Available versions: >= 1.0.0
Time complexity: O(1)
Return: The last element of the list. When key does not exist, return nil.
redis RPOP commandexample
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"