caching-strategies

Installation
SKILL.md

Caching Strategies

Concept of the skill

A cache stores a copy of data closer to the consumer so repeated reads avoid the expensive recompute or refetch. The win is real — an expensive query becomes a fast lookup — but the copy creates a coherence problem: it can drift from the source of truth. Caching is the discipline of capturing the speed-and-load win while controlling the staleness it introduces.

Every caching decision is two coupled choices made for a specific layer:

  1. Staleness budget — how out-of-date may this data be? (A price quote: seconds. A user's avatar: hours. A blog post: minutes.)
  2. Invalidation strategy — how does the copy get corrected when the source changes? (Expiry, explicit invalidation, versioned keys, write-through.)

The two famously hard problems, per the field's oldest joke, are cache invalidation and naming things — and caching forces you to confront the first one directly.

Coverage

Installs
2
First Seen
Jun 19, 2026
caching-strategies — jacob-balslev/skills