سؤال

In my Redis Client when I write : Keys *. I've all keys of my database. But when I try to write the same thing in Ruby, like that:

@list_keys = REDIS.keys *

It doesn't take '*'.

Do you have any idea how I could replace the '*' ?

هل كانت مفيدة؟

المحلول

If REDIS is an instance of your redis client, you can do

REDIS.keys('*')
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top