upstash-redis
Installation
SKILL.md
Upstash Redis Skill
This skill covers the three things serverless apps most often need Redis for: caching, sessions, and rate limiting. The client talks to Redis over HTTP, so it works where a long-lived TCP connection does not (edge middleware, short lived functions). Follow the steps in order; each ends with a checkpoint.
Requirements and limitations
- An Upstash Redis database (hosted service; usage-based pricing with a free tier). Credentials are a REST URL and token from the database page.
- Environment variables
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN. - Every command is an HTTP request. Batch with
pipeline()orMGET/MSETwhen you issue many commands per request; avoidKEYS *in production. - Values are serialized automatically (objects, arrays, numbers round-trip).
Do not
JSON.stringifybeforesetorparseIntafterget.