展示redis所有的keys

来源:互联网 发布:淘宝店铺滚动图片尺寸 编辑:程序博客网 时间:2024/05/20 11:47

redis开发如果不知道当前redis存有哪些key是很头疼的。 

  • h?llo matches hellohallo and hxllo
  • h*llo matches hllo and heeeello
  • h[ae]llo matches hello and hallo, but not hillo
redis> MSET one 1 two 2 three 3 four 4
OK
redis> KEYS *o*
1) "two"2) "four"3) "one"
redis> KEYS t??
1) "two"
redis> KEYS *
1) "two"2) "three"3) "four"4) "one"
redis> 

0 0
原创粉丝点击