Redis参考手册
列表 | Lists
lpop
LPOP key
自1.0.0起可用。
时间复杂度: O(1)
删除并返回存储在列表中的第一个元素key
。
返回值
散装串答复:所述第一元素的值,返回nil
当key
不存在。
例子
redis> RPUSH mylist "one" (integer) 1
redis> RPUSH mylist "two" (integer) 2
redis> RPUSH mylist "three" (integer) 3
redis> LPOP mylist "one"
redis> LRANGE mylist 0 -1 1) "two" 2) "three"
列表 | Lists相关
Redis 是一个开源的使用 ANSI C 语言编写、遵守 BSD 协议、支持网络、可基于内存亦可持久化的日志型、Key-Value 数据库,并提供多种语言的 API。 它通常被称为数据结构服务器,因为值( value )可以是 字符串( String ), 哈希(Map),列表(list),集合( sets ) 和 有序集合( sorted sets )等类型。
主页 | https://redis.io/ |
源码 | https://github.com/antirez/redis |
发布版本 | 4.0.2 |