当前位置:   article > 正文

【Redis】Redis默认过期时间是多少

redis默认过期时间

先上结论,一般是永不过期的

在使用redis的时候,突然想起这个问题,然后查了下【1】,redis的缓存内容默认是永不过期的。后面如果有时间,我再仔细看下相关内容,写在这里。

后记,
在看redis文档的时候,看到了这么一句话:

Keys with an expire

Normally Redis keys are created without an associated time to live. The key will simply live forever, unless it is removed by the user in an explicit way, for instance using the DEL command.【3】

参考资料:
【1】,redis默认过期时间:redis默认的是永不过期
【2】,Redis 内存淘汰机制
【3】,redis官方文档

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/466868
推荐阅读
相关标签
  

闽ICP备14008679号