caching-strategy
Installation
SKILL.md
caching-strategy Skill
Goal
This skill defines how to implement caching to improve performance without serving stale data.
Steps
1. Caching Patterns
Read Patterns
-
Cache-Aside (Lazy Loading) - Most Common
- App checks Cache.
- If hit: return.
- If miss: fetch DB -> write to Cache -> return.
- Pros: Resilient to cache failure. Cons: First request is slow.
-
Read-Through
- App asks Cache. Cache itself fetches from DB if missing.
- Pros: App logic simple. Cons: Requires specific library/provider support.