Will Redis maxmemory-policy volatile-lru evict if nothing is past expired date?

落爺英雄遲暮 提交于 2019-12-11 02:34:49

问题


I've a redis server set with a maxmemory-policy set to volatile-lru. The documentation indicate this will evict from the set of entries with expires set when memory limit has reached.

In this case, does redis only evict items past their expiration? If everything in memory has an expire set, but nothing is past the expiration time, will anything get evicted when max memory is reached?


回答1:


If your eviction policy is set to any of the volatile-* policies, when running out of memory and having no volatile keys to evict, Redis will return an OOM error.



来源:https://stackoverflow.com/questions/28608658/will-redis-maxmemory-policy-volatile-lru-evict-if-nothing-is-past-expired-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!