- Home
- Skills
- Data & Databases
- Redis Cache Architect
Works with the AI Agents you already use
Redis Cache Architect
A cache without an invalidation story isn't an optimization — it's a stale-data generator with good latency numbers.
$8.99
Redis Cache Architect
Example session with this skill installed
Our product listing API (Node + Postgres, about 50,000 products) takes 700-900 ms per category page. Prices and stock update every few minutes from the ERP, descriptions change rarely. Design a Redis caching layer.
- Read your context and instructions
- Compiled the redis cache architect
Redis design for category listings: cache product data and listing IDs separately, invalidate on ERP updates, jitter TTLs and guard against stampedes.
Cacheability assessment
| Data | Change rate | Cache? | Key | TTL |
|---|---|---|---|---|
| Product description, images | Rare | Yes | prod:{id}:static | 24 h |
| Price and stock | Every few minutes | Yes, short | prod:{id}:live | 120 s |
| Category page ID list | On product add/remove | Yes | cat:{id}:p{page}:{sort} | 10 min |
| Cart, checkout totals | Per request | No | n/a | n/a |
Invalidation
- ERP sync job deletes
prod:{id}:livefor every changed product after the DB commit. - Product create, delete or recategorize deletes
cat:{id}:*via a set of page keys per category (noKEYSscans). - Static data uses TTL plus explicit delete on admin edit.
TTL jitter
const ttl = base + Math.floor(Math.random() * base * 0.1);
Spreads expiry so a whole category does not expire together.
Stampede protection
const lock = await redis.set(`lock:${key}`, 1, 'NX', 'PX', 3000);
if (!lock) return staleOrWait(key);
- One request rebuilds; others serve the stale value or wait briefly.
- Build pages with
MGETon product keys to avoid N round trips.
Next steps
- Measure cache hit rate and rebuild time per key type after rollout.
- Decide the eviction policy (
allkeys-lrusuits this pattern).
Connects securely to your tools. The creator never sees your data.
About this skill
A cache without an invalidation story isn't an optimization — it's a stale-data generator with good latency numbers. This skill designs your Redis caching layer properly: what to cache and what not to (some things invalidate so frequently that caching costs more than it saves), key namespace strategy that doesn't collide across services, TTL choices calibrated to your data's actual staleness tolerance, invalidation patterns for write-through vs. cache-aside vs. read-through, and memory sizing so your cache doesn't evict the hot data to keep the cold. It also covers the failure modes — what happens when Redis goes down, and whether your app degrades gracefully or fails completely. Give it your hottest queries, your data update frequency, and your current pain points; it returns a caching architecture that actually reduces load instead of shifting complexity.
- Does not provide real-time Redis cluster monitoring.
- Focused on architecture and logic, not low-level C module development.
- Assumes basic familiarity with Redis primitives.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 months ago
Permissions
No special permissions declared or detected