Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis keys command should removed in favor of scan #32

Open
tim-friedrich opened this issue Mar 8, 2017 · 1 comment
Open

Redis keys command should removed in favor of scan #32

tim-friedrich opened this issue Mar 8, 2017 · 1 comment

Comments

@tim-friedrich
Copy link

Hi,

Nice gem btw.
I had a look at the source and found that you are using the redis keys command to get the keys that match a particular pattern.
The keys command is blocking and should only be used for debugging. Since it can block your whole database if it is large enough. https://redis.io/commands/keys

You should use scan each instead. It batches the requests to the database. http://www.rubydoc.info/github/redis/redis-rb/Redis%3Ascan_each

@mikeymicrophone
Copy link

I'm interested in this change, since I would like to use the browser in production. Maybe I can assist in implementing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants