xiaochengzi

 

一、连接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>

 

分类:

技术点:

相关文章:

  • 2022-02-15
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
相关资源
相似解决方案