Upstash · Method
redis.ttl
Use redis.ttl(key) to read the remaining lifetime of a Redis key in seconds. The result is negative when the key does not exist or has no expiration.
Last updated
Syntax
redis.ttl(key)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
EXPIREEXPIREATPERSISTPTTL