Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
---|---|---|---|---|
Enabled |
No |
No |
0.1 |
- |
This cop detects the use of KEYS
query that should be noted when used in a production environment.
Consider using SCAN
query instead of KEYS
query.
See https://redis.io/commands/keys/ for details.
To avoid detecting Hash#keys
calling, this cop adds an offense only if a receiver of keys
method is named redis
.
Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
---|---|---|---|---|
Enabled |
Yes |
No |
0.1 |
- |
Use setex
method instead of calling both set
and expire
methods in a transaction.
See https://redis.io/commands/setex/ for details.