String

MSETNX

Set multiple keys in one go unless they exist already.

For billing purposes, this counts as a single command.

Arguments

Record<string, TValue>required

An object where the keys are the keys to set, and the values are the values to set.

Response

required

True if all keys were set, False if at least one key was not set.

Example
redis.msetnx({  "key1": "value1",  "key2": "value2"})
Loading search…