Mexpire
Bun

method

RedisClient.expire

key: KeyLike,
seconds: number
): Promise<number>;

Set a key's time to live in seconds

@param key

The key to set the expiration for

@param seconds

The number of seconds until expiration

@returns

Promise that resolves with 1 if the timeout was set, 0 if not

Referenced types

type KeyLike = string | ArrayBufferView | Blob