Mgetset
Bun

method

RedisClient.getset

key: KeyLike,
value: KeyLike
): Promise<null | string>;

Set the value of a key and return its old value

@param key

The key to set

@param value

The value to set

@returns

Promise that resolves with the old value, or null if the key didn't exist

Referenced types

type KeyLike = string | ArrayBufferView | Blob