Skip to content

Add @pegma/cache-upstash-redis (Cache Core Phase 5) - #5

Merged
FlyOverCoderKY merged 2 commits into
mainfrom
cursor/cache-upstash-redis-9758
Aug 15, 2026
Merged

FlyOverCoderKY merged 2 commits into
mainfrom
cursor/cache-upstash-redis-9758

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Phase 5 lands @pegma/cache-upstash-redis 0.1.0, a CacheStore adapter for the Upstash serverless Redis client.

Decision

Azure Cache for Redis and ElastiCache speak the Redis protocol, so those packages compose @pegma/cache-redis and inject ioredis. Upstash's distinctive client is HTTP REST (@upstash/redis), not that TCP surface: no getBuffer, and eval is (script, keys, args) rather than ioredis (script, numKeys, ...).

This package wraps that REST command surface and reuses createRedisCacheStore after adapting it. Envelopes travel as base64 strings so Lua compare-and-set still sees the same bytes the HTTP client stored. The adapter does not pretend @upstash/redis is ioredis, and it does not invent implicit cross-partition multi-key ops.

CI

@upstash/redis cannot talk to the Redis protocol service the other adapters use. There is no live Upstash account in CI. pnpm run test:upstash-redis injects a client with the Upstash command surface that talks to the same Redis on port 16379, and still runs @pegma/cache-conformance. Point UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN at a real Upstash database to run the same cases through the official SDK.

Also

  • Injected Clock and Logger only; @pegma/* deps pinned exactly.
  • Package has its own README and LICENSE (RetireGolden, LLC), prepack builds, tsconfig excludes tests.
  • Release inventory, publish workflow, and docs/AGENTS.md now treat Phase 5 as the current stage. No further adapter packages.

Does not publish, release, or tag.

Verification

pnpm run format:check, pnpm run check, pnpm test, and pnpm run test:upstash-redis all pass.

Open in Web Open in Cursor 

Phase 5 lands a CacheStore adapter for Upstash Redis by wrapping the
serverless HTTP client and reusing createRedisCacheStore after adapting
that client's command surface. The REST client cannot speak the Redis
protocol, so CI injects an Upstash-shaped client against the same Redis
the other adapters use.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

The REST client surface takes a readonly args array; the observer must
copy it before assigning to a mutable test fixture.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@FlyOverCoderKY
FlyOverCoderKY merged commit 1a435ed into main Aug 15, 2026
13 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the cursor/cache-upstash-redis-9758 branch August 15, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants