开发者

Is there a way to determine if a redis key contains a list or a set?

开发者 https://www.devze.com 2023-03-08 15:09 出处:网络
After determining the list of keys in a redis database, is there any way to determine if a particular key (given only t开发者_如何学运维he name) is a list or a set?

After determining the list of keys in a redis database, is there any way to determine if a particular key (given only t开发者_如何学运维he name) is a list or a set?

I am using the Ruby redis gem 2.1.1


Just use the TYPE command.

r.type(:mykey)

0

精彩评论

暂无评论...
验证码 换一张
取 消