cache-invalidation
Installation
SKILL.md
Cache Invalidation
Three patterns, each with different consistency guarantees and complexity. Pick the right one before writing any code.
Phase 1: Discovery
Before recommending a pattern, establish:
What is being cached?
- Per-user vs shared data — shared data is harder; one user's write invalidates everyone's cache
- Aggregate/computed data (counts, totals, ranked lists) — these have fan-out invalidation problems
- Relational data — a single entity change may invalidate N cache keys that join against it