Redis命令参考:http://redisdoc.com/
一、Key(键)
1、删除key
DEL key1 key2 key3
二、Hash(哈希表)
1、删除 HDEL key field [field ...]
2、HKEYS key
扫描二维码关注公众号,回复:
286520 查看本文章
list of fields in the hash, or an empty list when key does not exist.
HGET key field
返回哈希表 key
中给定域 field
的值。
给定域的值。
当给定域不存在或是给定
key
不存在时,返回
nil
。
---------------------------------------------------------
# 域存在
redis> HSET site redis redis.com
(integer) 1
redis> HGET site redis
"redis.com"
# 域不存在
redis> HGET site mysql
(nil)
---------------------------------------------------------