agentsclimarketplace

Caching strategies

Skill shinzoxD/knackbox/skills/coding/caching-strategies

Curated, auditable, benchmark-ready Agent Skills library for Claude Code, Codex, OpenCode, Cursor, and more.

Install
npx -y skills add shinzoxD/knackbox --skill caching-strategies

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

2 things to look at

  • 27 days oldThe repository was created 27 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

Design caching layers with correctness, TTLs, invalidation, and stampede control. Use whenever the user asks about Redis cache, CDN caching, HTTP cache headers, cache invalidation, thundering herd, or stale reads.

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

1.6 KB, as published. Nobody here has run it

Caching Strategies

Cache for latency and cost, not as a second source of truth without a plan. Name the consistency model and invalidation path.

Workflow

  1. Read pattern, freshness needs, and blast radius of stale data.
  2. Layer: browser, CDN, app memory, Redis, DB.
  3. Key design and TTL; avoid unbounded key growth.
  4. Invalidation: TTL-only vs event-driven vs write-through.
  5. Stampede: singleflight, soft TTL, probabilistic early expire.
  6. Negative caching for misses.
  7. Metrics: hit ratio, latency, error on cache path.

Output format

## Cache design: <surface>
**Consistency:** …
**Keys / TTL:** …
**Fill path:** …
**Invalidate:** …
**Stampede control:** …
**Failure mode:** …

Rules

  1. Security: never cache authorized personal data under shared keys.
  2. Prefer explicit invalidation for user-visible mutations.
  3. Document what clients may see stale.
  4. Measure before multi-layer complexity.
  5. Do not invent Redis commands incorrectly — describe intent.

Edge cases

  • CDN + auth: private vs public.
  • Multi-region: replication lag.
  • Search indexes: near-cache vs source of truth.

Keep looking

Skills are one crate of 328,083. 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.