Redis过期时间问题

Redis大约 606 字

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等操作,过期时间保持原状

expire文档

阅读 318 · 发布于 2019-04-08

————        END        ————

扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看换一批