Mpttl
Bun

method

RedisClient.pttl

key: KeyLike
): Promise<number>;

Get the time to live for a key in milliseconds

@param key

The key to check

@returns

Promise that resolves with the TTL in milliseconds, or -1 if the key has no expiration, or -2 if the key doesn't exist

Referenced types

type KeyLike = string | ArrayBufferView | Blob