Caching strategies

From rnavarych/alpha-engineer · View interactive version

Caching strategies is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. Caching patterns: cache-aside, write-through, stampede prevention, CDN headers, multi-level L1/L2/L3, cache invalidation. Use when designing caches or CDN strategy.

How to use this skill

Skill file

Caching Strategies

When to use

Core principles

  1. Cache-aside is the default — application controls all cache interactions
  2. Always add jitter to TTL — ±10% prevents synchronized expiry stampedes
  3. Cache invalidation is harder than caching — design invalidation FIRST, then TTL
  4. Multi-level cache reduces latency multiplicatively — L1 (in-memory) → L2 (Redis) → L3 (DB)
  5. A cache miss should never cascade to DB overload — use lock-based prevention

References available

Assets available

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.