Operation of the basic structure in redis five (redis-cli mode)

This article mainly refers to "Redis combat"
OK, let's load it up below.
The five structures in redis are
STRING string
LIST list
HASH hash
SET collection
ZSET sorted set

first look
1. Operation of STRING
get Get the value of the key
set sets the value of key and value
del delete key

2, and then the operation of LIST
LPUSH RPUSH LPOP RPOP

3. Basic operation of Set
Let's talk about the difference between set and list first:
In redis, set and list can store multiple data, but duplicate data is allowed in list, and duplicate data is not allowed in set.
sadd srem smembers sismember


4. Basic operation of hash
hset hget hdel hgetall


5. Basic operation of zset
zadd zrem zrange zrangebyscore


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325641230&siteId=291194637