Skip to content

The cache was fast until it wasn't

Six lessons about stale fills, expired hot keys, miss amplification, negative caches, privacy and cold recovery.

Start series →

Follow the decisions in order

  1. Part 1 of 6

    Senior

    The price changed. Why did the old price come back?

    Recognize a read-fill/invalidation interleaving and select a freshness contract with correctly preserved ordering evidence.

  2. Part 2 of 6

    Staff

    One key expired. Why did database reads surge?

    Turn an expired hot key from a database stampede into bounded refill work, with explicit failure and staleness policies.

  3. Part 3 of 6

    Senior

    Hit rate fell from 95% to 80%. Why did the database suddenly struggle?

    Translate a percentage-point hit-rate regression into origin demand, then diagnose workload and key-distribution causes.

  4. Part 4 of 6

    Staff

    The IDs do not exist. Why are they melting the database?

    Protect misses for absent keys using validation, scoped negative caching, optional membership filters and a safe creation freshness contract.

  5. Part 5 of 6

    Staff

    The cache was fast. Why did one customer see another customer's orders?

    Treat cached identity as part of the authorization boundary, applying HTTP shared-cache rules to personalized responses.

  6. Part 6 of 6

    Principal

    Every cache node restarted. Why did adding capacity make recovery worse?

    Classify cache as a capacity dependency and design bounded recovery when the entire working set is cold.