Redis 数据类型和使用方法
作者:互联网
1.String
set key1 "value"
get key1
2.hash (hmset hget)
hmset hname key1 "value1" key2 "value2"
hget hname key1
hget hname key2
3.List (lpush lrange)
lpush lname aaa
lpush lname bbb
lpush lname ccc
lrange lname 0 10
4.set (sadd smembers)
sadd sname aaa
sadd sname bbb
sadd sname ccc
smembers lname 0 10
5.有序set(zset) (zadd zrangeByScore)
zadd myredis 0 redis
zadd myredis 0 mongodb
zadd myredis 0 rabitmq
ZRANGEBYSCORE myredis 0 1000
标签:myredis,数据类型,key1,Redis,lname,lpush,sadd,zadd,方法 来源: https://www.cnblogs.com/zxrxzw/p/10893279.html