我的知识记录分享

我的知识记录分享

Redis中的键值过期操作

2019-11-12 糖果小宝 php开发

1.过期设置 Redis 中设置过期时间主要通过以下四种方式: expire key seconds:设置 key 在 n 秒后过期; pexpire key milliseconds:设置 key 在 n 毫秒后过期; expireat key timestamp:设置 key 在某个时间戳(精确到秒)之后过期; pexpireat key millisecondsTimestamp:设置 key 在某个时间戳(精确到毫秒)之后过期; 下面分别来看以上这些命令的具体实现。 1)...

阅读全文>>

标签: redis

评论(0) 浏览(1052)