redis-upstash
Use when working with Redis or Upstash — caching, rate limiting, queues, session storage, or pub/sub. Also use when adding a caching layer to an existing application or implementing background job processing with serverless-compatible Redis.
| Model | Source |
|---|---|
| sonnet | pack: database |
Full Reference
┏━ 🔧 redis-upstash ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Redis or Upstash — cachi… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Redis / Upstash
Section titled “Redis / Upstash”Upstash is a serverless Redis platform built for edge and serverless environments. HTTP-based — no persistent TCP connections, no connection pools to manage, no cold-start penalties. Pay per request, scale to zero.
Core products: Redis (key-value store), QStash (message queue/scheduler), Vector (vector search).
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Console | https://console.upstash.com |
| Docs | https://upstash.com/docs |
| Redis SDK | npm install @upstash/redis |
| Rate Limit SDK | npm install @upstash/ratelimit |
| QStash SDK | npm install @upstash/qstash |
| Vector SDK | npm install @upstash/vector |
| Free Tier | 500K commands/month, 256MB storage |
| PAYG | Per-command pricing, 200GB bandwidth free/month |
| Init | Redis.fromEnv() — reads UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Create database, install SDKs, initialize client, REST API, TCP | reference/setup.md |
| Strings, hashes, lists, sorted sets, sets, pipeline, transactions | reference/core-operations.md |
| Cache-aside, write-through, invalidation, TTL strategies, memoization | reference/caching.md |
| Sliding window, fixed window, token bucket, Next.js middleware, multi-region | reference/rate-limiting.md |
| Publish messages, schedule cron, receive + verify, DLQ, local dev | reference/qstash.md |
| Session create/read/extend/destroy, Next.js cookies, force-logout | reference/session-storage.md |
| Publish, subscribe, serverless limitations, alternatives | reference/pubsub.md |
| Upsert, query, hybrid search, delete, similarity functions | reference/vector-search.md |
| HTTP vs TCP comparison, region co-location, global replication, edge | reference/serverless.md |
| Redis, QStash, Vector plans + hard limits | reference/pricing.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.