Overall
SDKs
- Typescript
- @upstash/redis
- @upstash/query
- @upstash/vector
- @upstash/edge-flags
- @upstash/ratelimit
- @upstash/kafka
- @upstash/qstash
- Python
DevOps
- Terraform
- Pulumi
- CLI
Generic
EXISTS
Check if a key exists.
await redis.set("key1", "value1")
await redis.set("key2", "value2")
const keys = await redis.exists("key1", "key2", "key3");
console.log(keys) // 2
Arguments
One or more keys to check.
Response
The number of keys that exist
await redis.set("key1", "value1")
await redis.set("key2", "value2")
const keys = await redis.exists("key1", "key2", "key3");
console.log(keys) // 2
Was this page helpful?
await redis.set("key1", "value1")
await redis.set("key2", "value2")
const keys = await redis.exists("key1", "key2", "key3");
console.log(keys) // 2