Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Arguments

key
string
required
The key of the hash.
field
string
required
The name of the field.
value
TValue
required
Any value, if it’s not a string it will be serialized to JSON.

Response

1 if the field was set, 0 if it already existed.
await redis.hsetnx("key", "id", 1)