Caching strategy
AI-agent skills for software engineering — works with Claude Code, Codex, Cursor
npx -y skills add vaibhavsaxena022/skills --skill caching-strategyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Add caching to a read-heavy path with a correct invalidation strategy. Use when an endpoint or query is read-heavy and slow. Chooses what to cache, where, the TTL, and how to keep it from going stale.
SKILL.md
1.3 KB, as published. Nobody here has run it
Caching Strategy
Speed up reads without serving stale data.
Decide
- What — cache the expensive, read-heavy result that tolerates slight staleness (not everything).
- Where — in-process for tiny/hot data; shared (Redis) for cross-instance consistency.
- Key — precise; include every input that changes the result (and tenant/user if scoped).
- TTL — the staleness the use case tolerates; add jitter to avoid synchronized expiry.
- Invalidation — on write, evict/update the affected keys. Prefer explicit invalidation over hoping the TTL covers it.
Watch for
- Stampede — lock or coalesce requests on a miss for hot keys.
- Consistency — never cache data that must be strongly consistent.
Rules
- Correctness first: if you can't invalidate it reliably, don't cache it.