String

MSETNX

Set multiple keys in one go unless they exist already.

For billing purposes, this counts as a single command.

Arguments

Record<str, TValue>required

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

Response

required

1 if all keys were set, 0 if at least one key was not set.

Example
redis.msetnx({    key1: 1,    key2: "hello",    key3: { a: 1, b: "hello" },})
Loading search…