agentsclimarketplace

Caching strategy

Skill vaibhavsaxena022/skills/caching-strategy

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.From its SKILL.md

Install
npx -y skills add vaibhavsaxena022/skills --skill caching-strategy

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 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.

SKILL.md

1.3 KB, 194 tokens by cl100k_base, as published. Nobody here has run it

Caching Strategy

Speed up reads without serving stale data.

Decide

  1. What — cache the expensive, read-heavy result that tolerates slight staleness (not everything).
  2. Where — in-process for tiny/hot data; shared (Redis) for cross-instance consistency.
  3. Key — precise; include every input that changes the result (and tenant/user if scoped).
  4. TTL — the staleness the use case tolerates; add jitter to avoid synchronized expiry.
  5. 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.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.