redis - 保存一个数组, LPUSH保存, LINDEX读取某个, LRANGE 读取一堆

访问量: 206

非常简单. 

例如: 

> LPUSH fruits apple   # => ["apple"]

> LPUSH  fruits banana   # => ["banana", "apple"]

> LINDEX fruits 0     # => "banana"

> LINDEX fruits 1    # =>  "apple"

> LRANGE fruits 0 1  #=> ['banana', 'apple']

订阅/RSS Feed

Subscribe

分类/category