SKILL.md
562 lines · 2,096 words
Caching Strategist
Purpose
Design and implement caching strategies that dramatically improve application performance while maintaining data consistency. This skill covers caching patterns at every layer of the stack, from CDN edge caching through application and database levels.
Caching Decision Framework
SHOULD I CACHE THIS?
Is the data read frequently?
NO -> Probably don't cache
YES -> Is the data expensive to compute/get?
NO -> Light caching or skip (overhead may not be worth it)
YES -> Definitely cache
Can the data be stale for any period?
NO -> Cache with synchronous invalidation (write-through)
YES -> How long can it be stale?
Seconds: Short TTL (5-30s)
Minutes: Medium TTL (1-15min)
Hours: Long TTL (1-24hr)
Days: Very long TTL + explicit invalidation
Does stale data cause business problems?
YES -> Use write-through or event-driven invalidation
NO -> Use TTL-based expiry (simpler)