如果没有任何过期日期,Redis可以将maxmemory-policy volatile-lru逐出吗? [英] Will Redis maxmemory-policy volatile-lru evict if nothing is past expired date?

查看:204
本文介绍了如果没有任何过期日期,Redis可以将maxmemory-policy volatile-lru逐出吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个redis服务器,其 maxmemory-policy 设置为 volatile-lru 。文档指出,这将在达到内存限制时从具有过期设置的条目集中退出。

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.

在这种情况下,是否仅将Redis逐出过期的物品?如果内存中的所有内容都设置了过期设置,但没有超过过期时间,那么达到最大内存后,是否会收回任何内容?

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?

推荐答案

如果将驱逐策略设置为任何 volatile-* 策略,当内存不足且没有易失键退出时,Redis将返回OOM错误。

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.

这篇关于如果没有任何过期日期,Redis可以将maxmemory-policy volatile-lru逐出吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆