Return the value of the specified key and replace it with a new value.
const oldValue = await redis.getset("key", newValue);
The key to get.
The new value to store.
The response is the value stored at the key or null if the key doesn’t exist.
null
Was this page helpful?