Redis命令行查询缓存值
一、连接Redis服务器
redis-cli -h host -p port -a password
二、查询所有的keys
keys *
三、获取指定的key对应的值
1)查询key对应的value
type <key>
2)不同的type,查询的命令不一样
if value is of type string -> GET <key> if value is of type hash -> HGETALL <key> if value is of type lists -> lrange <key> <start> <end> if value is of type sets -> smembers <key> if value is of type sorted sets -> ZRANGEBYSCORE <key> <min> <max>