Generic
TTL
Return the expiration in seconds of a key.
const seconds = await redis.pttl(key);
Arguments
key
string
requiredThe key
Response
The number of seconds until this expires, negative if the key does not exist or does not have an expiration set.
const seconds = await redis.pttl(key);