const millis = await redis.pttl(key);

Arguments

key
string
required

The key

Response

The number of milliseconds until this expires, negative if the key does not exist or does not have an expiration set.

const millis = await redis.pttl(key);