Redis 过期时间问题
Redis 评论 1 大约 637 字Redis 过期时间问题
The timeout will only be cleared by commands that delete or overwrite the contents of the key, including DEL, SET, GETSET and all the *STORE commands. This means that all the operations that conceptually alter the value stored at the key without replacing it with a new one will leave the timeout untouched. For instance, incrementing the value of a key with INCR, pushing a new value into a list with LPUSH, or altering the field value of a hash with HSET are all operations that will leave the timeout untouched.
del
/set
/getset
和所有*store
的命令会清除过期时间,变为-1
incr
/lpush
/hset
等操作,过期时间保持原状
参考文档
阅读 2141 · 发布于 2019-04-08
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
-
fHLvlxbf 1楼
e
Chrome | Windows 10 2023-07-24
随便看看
换一批
-
Spring Boot 单元测试无法 mock @Value 标注的字段阅读 518
-
Java 后端面试题汇总阅读 698
-
Spring Boot OpenFeign PATCH 请求报错:java.net.ProtocolException: Invalid HTTP method: PATCH阅读 927
-
IDEA 多个 Vue.js 工程识别 Webpack @ 别名阅读 755
-
SpringMVC 请求体接收任意格式参数阅读 905
-
软考-系统架构设计师:联邦数据库阅读 1272
-
Linux xxx is not in the sudoers file.This incident will be reported阅读 2534
-
Kubernetes 搭建之配置 CentOS7 环境阅读 1045
-
面试题:HashMap 和 Hashtable 的区别阅读 2105
-
Spring Boot Thymeleaf 国际化 i18n阅读 121