redis过期时间

查看key过期时间方式:ttl key

返回值有以下几种:

-1:永不过期,永久有效

-2:该键不存在或者没有设置过期时间

 

posted @ 2023-11-28 21:48  使用D  阅读(9)  评论(0编辑  收藏  举报