caching-strategies

Installation
SKILL.md

Caching Strategies

Caching is the most commonly misapplied performance technique. The failure mode is not "cache too little" — it is "cache without an invalidation strategy and then discover the problem in production six months later when users complain about stale data that you cannot explain."

When to Use

✅ Use for:

  • Choosing which caching pattern fits a use case (cache-aside, write-through, write-behind)
  • Designing TTL values for different data freshness requirements
  • Implementing Redis caching patterns: sorted sets, pub/sub invalidation, Lua scripts
  • Configuring Cache-Control headers, ETags, and CDN behavior
  • Preventing cache stampedes via locking, probabilistic early expiry, or background refresh
  • Cache warming strategies for cold-start scenarios
  • Multi-tier cache design (in-memory L1, Redis L2, CDN L3)

❌ NOT for:

  • Database-internal query plan caching (handled by the database)
  • Python functools.lru_cache / JavaScript memoize utilities (pure function memoization)
  • CPU branch prediction or hardware cache tuning
Related skills
Installs
66
GitHub Stars
103
First Seen
Mar 9, 2026