【问题标题】:In Redis, how do I get the expiration date of a key?在 Redis 中,如何获取密钥的到期日期? 【发布时间】:2011-10-19 14:41:35 【问题描述】: 我用什么命令查看还剩多少秒? 【问题讨论】: 标签: database redis 【解决方案1】: TTL key 请参阅TTL command 的文档。 还有一个 PTTL command 从 Redis 2.6 开始返回以毫秒而不是秒为单位的时间量。 【讨论】: