Skip to content

Redis keys command should removed in favor of scan #32

@tim-friedrich

Description

@tim-friedrich

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions