请教大家,想获得redis中已经创建的key的年龄,该如何获得,重要的是这个key没有设置过期时间,请问大家该如何获得?感谢各位!!!
闭关修行中......
Use a hash type to record it.
Use ttl method
If the key does not exist, return -2
If the key does not have a survival time set, return -1
If the survival time has been set, return the remaining survival seconds
Use a hash type to record it.
Use ttl method
If the key does not exist, return -2
If the key does not have a survival time set, return -1
If the survival time has been set, return the remaining survival seconds