Mpexpire
Bun

method

RedisClient.pexpire

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

Set a key's time to live in milliseconds

@param key

The key to set the expiration for

@param milliseconds

The number of milliseconds until expiration

@returns

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

Referenced types

type KeyLike = string | ArrayBufferView | Blob