hashing (hash)The Hash type in Redis can be seen as a map container with string key and string value. This type is ideal for storing object information. such as the user's username password and so on. Each Hash can store 4,294,967,295 key-value pairs
Storage (Hset)
Hset key field Value field does not exist and is stored directly. field exists, performing an overwrite operation.
store multiple key-value pairs (hmset)
Hmset key field Value field value ... field does not exist and is stored directly. field exists, performing an overwrite operation.
Read (Hget)
Hget key Field field does not exist, and the value corresponding to field is read normally. field exists and returns nil.
read multiple values (hmget)
Hmget key Field field ... field does not exist, normal read field corresponds to the value. field exists and returns nil.
Read All (Hgetall)
Hgetall Key
Delete (Hdel)
Hdel key Field field ... The command can delete more than one field at a time, and the return value is the number of deleted fields. field exists, deleting fields, returning the number of deleted fields. field does not exist, returns 0.
Increment (Hincrby)
Hincrby key field Numbervalue increments the specified increment for an integer value, and you can specify that the increment is a negative number to achieve the decrement
determine if a field exists (hexists)
Hexists key Field field exists, returning 1. field does not exist, returns 0.
gets the number of fields in the specified key (Hlen)
Hlen Key
gets all fields of the specified key (Hkeys)
Hkeys Key
gets the value of all fields of the specified key (hvals)
Hvals Key