Redis-哈希hash操作命令
Redis-哈希hash操作命令
Redis hash是一个string类型的field和value的映射表,hash特别适合用于存储对象,常用命令:
HSET key field value
将哈希表key中的字段field的值设为valueHGET key field
获取存储在哈希表中指定字段的值HDEL key field
删除存储在哈希表中的指定字段HKEYS key
获取哈希表中所有字段HGETALL key
获取在哈希表中指定key的所有字段和值