英文:
Does redis KEYS operation affect LRU eviction policy
问题
I am wondering if using KEYS does affect the LRU eviction policy? Let's say I grab all the keys using KEYS
command, does that count as all keys have been recently used thus resetting the LRU and in turn makes the eviction act almost randomly?
Read the documentation on redis, found no answers on it.
英文:
I am wondering if using KEYS does affect the LRU eviction policy? Let's say I grab all the keys using KEYS
command, does that count as all keys have been recently used thus resetting the LRU and in turn makes the eviction act almost randomly?
Read the documentation on redis, found no answers on it.
答案1
得分: 1
不会更新 LRU 或 LFU 统计。
然而,在生产环境中,您绝不应该使用 KEYS
命令,因为它可能会导致 Redis 长时间阻塞。
英文:
NO, it does NOT update LRU or LFU stats.
However, you should never use KEYS
command in production environment, since it might block Redis for a long time.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论