String
SET
Set a key to hold a string value.
await redis.set("my-key", {my: "value"});
Arguments
key
string
requiredThe key
value
TValue
requiredThe value, if this is not a string, we will use JSON.stringify
to convert it
to a string.
opts
object
You can pass a few options to the command.
Response
"OK"
await redis.set("my-key", {my: "value"});