标签:Redis
set name linuxString(字符串)
set page_view 20
get page_view
INCR page_view
INCR page_view 2
DECR page_view
DECR page_view 2
STRLEN page_view
Hash(哈希表)
HSET car price 200000
HSET car name BMW
type car
HGETALL car
HGET car price
HGET car name
HDEL car name
HKEYS car
HLEN car
del car
List(列表)
LPUSH numbers 1
LPUSH numbers a
RPUSH numbers 1
RPUSH numbers a
LLEN numbers
LRANGE numbers 0 -1
LPOP numbers
LRANGE numbers 0 -1
Set(集合)
SADD a 1
SADD a 2
SADD a 3
SADD b 2
SADD b 3
type a
SMENBERS a
SISMENBER a 1
SDIFF a b
SINTER a b
SUNION a b
标签:Redis
原文地址:http://blog.51cto.com/12796454/2118172