简体   繁体   English

有没有办法在 Redis 中禁用命令“keys *”?

[英]Is there a way to disable command 'keys *' in Redis?

I'm using AWS elastic cache Redis.我正在使用 AWS 弹性缓存 Redis。

I saw that Warning: consider KEYS as a command that should only be used in production environments with extreme care in Redis Documentation.我在 Redis 文档中看到了Warning: consider KEYS as a command that should only be used in production environments with extreme care

If I want to disable the 'key' command, Is there a way to disable command 'keys' or 'keys *' in Redis?如果我想禁用“key”命令,有没有办法在 Redis 中禁用命令“keys”或“keys *”?

Thanks谢谢

Solution解决方案

You can disable the 'keys' command using the rename-commands in the parameter group(AWS elastic cache Parameter group).您可以使用参数组(AWS 弹性缓存参数组)中的重命名命令禁用“keys”命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM