⚡AgentSkills
⚙️ Backend Engineering · Caching & Queues

Layer caching with explicit invalidation

Decide what caches where (CDN, app, Redis) and how entries die so staleness stays bounded.

intermediate~35 minBackend EngineersAPI DevelopersPlatform Engineers

Steps

  1. 1Classify data: immutable (cache forever), mutable-TTL, never-cache (money)
  2. 2Cache at CDN for anonymous GETs with stale-while-revalidate
  3. 3Memoize expensive computed objects in-process with short TTL
  4. 4Use Redis for shared cross-instance state; set TTLs on everything
  5. 5Invalidate by key pattern on write events, not manual flushes
  6. 6Monitor hit-rate per layer; below 60% means wrong layer or wrong keys

Common Pitfalls

  • ▲Caching authenticated responses at shared CDN edge
  • ▲Thundering herd on expiry without jitter or locks

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill caching-queues-cache-strategy-layers
Install globally
$ npx skills add aniruddhaadak80/skills --skill caching-queues-cache-strategy-layers -g

Tags

#caching#redis#cdn#backend-engineering#caching-queues

Related skills

Queue async work with retries, dead-letters, and observability so failures surface instead of vanishing.

⚙️ Backend Engineering·~35m