redis 过期时间

 

EXPIRE | Docs https://redis.io/docs/latest/commands/expire/

The EXPIRE command supports a set of options:

  • NX -- Set expiry only when the key has no expiry
  • XX -- Set expiry only when the key has an existing expiry
  • GT -- Set expiry only when the new expiry is greater than current one
  • LT -- Set expiry only when the new expiry is less than current one

A non-volatile key is treated as an infinite TTL for the purpose of GT and LT. The GTLT and NX options are mutually exclusive.

 

 

 

 

 

 

posted @ 2024-09-29 18:07  papering  阅读(5)  评论(0编辑  收藏  举报