The Last Cachebender Four realms, one page
14 lessons
A guided path · fourteen lessons

Learn where to cache — and what each choice costs.

Follow one product page through the browser, CDN, application and database. Learn where to cache each part and how to handle heavy traffic.

14Lessons
4Cache realms
5Attacks to survive
7Parts of one page
Prologue

The Forgotten Art

The world has slowed. Pages take seconds to load. Servers fall over on ordinary afternoons, and people are leaving the realm for faster lands. The Latency Lord rules, and almost nobody remembers that there was ever a way to fight him.

You are about to learn that there is.

There is also a deadline. Word has arrived of the Surge — a wave of traffic the realm cannot avoid and, as things stand, cannot survive.

One page. Seven parts. Seven different answers.

Every lesson uses the same product page. Its images, price, stock and cart need different caching rules.

Follow a request through the four realms. A miss moves it to the next layer.
Air Browser cache On the user's device
Not stored here
Water CDN edge At a nearby CDN location
Not stored here
Earth Application and Redis Your own servers
Not stored here
Fire The database The source of truth

When a cache answers, the request can skip the layers below it. You will learn when it is safe to reuse that answer.

The shared example A product page, with its caching rules below
Product page example Wayfinder Supply
Wayfinder Supply Atlases Field notes Bag 1Cache note 7
Home Atlases Four Realms Atlas

The Wayfinder collection · Vol. I

Four Realms Atlas

Cache note 3
★★★★★4.9248 reviewsCache note 6

A hand-bound guide to the roads, rivers and hidden passages connecting every realm.

$84.00Cache note 4

Hardcover Illustrated field edition

In stock — 12 leftCache note 5
Qty 1

An illustrated storefront for this course. Checkout is not available.

The Latency Lord studies every choice you make.

"He does not need to take the cache away. He only needs to choose the moment it empties."
The Forge, Lesson 8

As you learn, the Latency Lord studies your caches and prepares five attacks. In Lesson 12, you use techniques from earlier lessons to defend against them.

An original illustration of the Latency Lord in obsidian armor beside a fractured hourglass.
The learning path

Four realms. One journey.

Fourteen lessons, from your first cached copy to a system ready for the Surge. Start at the beginning, or return to a realm.

7 chapters 14 lessons
Prologue
Lessons 01–02

The Forgotten Art

Begin with a single copy.

  1. Lesson 01

    The Forgotten Art of Caching

    What a cache is, why distance costs so much, and why this is a design decision rather than a late fix.

    LatencyTrade-offs
  2. Lesson 02

    The Trial of Hits and Misses

    Keys, values, lifetimes and warming. Three of the five defenses in Lesson 12 trace back to here.

    KeysTTLHit ratio
Book One · Air
Lesson 03

The Browser Realm

Start closest to the reader.

  1. Lesson 03

    The Browser Realm

    Headers, validation and fingerprinted filenames. The one realm whose storage is free and whose copies you cannot recall.

    Cache-ControlETagFingerprints
Book Two · Water
Lesson 04

The Edge Kingdom

Carry shared copies closer.

  1. Lesson 04

    The Edge Kingdom

    A CDN serves shared content closer to users. Learn how its cache key decides which requests can reuse a response.

    Edge keysVaryPurge
Book Three · Earth
Lessons 05–06

The Application Sanctum

Build on shared memory.

  1. Lesson 05

    The Application Sanctum

    Reuse data inside your application process, and see why two servers can hold different prices.

    In-processMemoization
  2. Lesson 06

    The Distributed Cache Tribes

    What Redis adds beyond a shared cache, when it helps, and what it costs.

    RedisReplicasFailover
Book Four · Fire
Lesson 07

The Database Depths

Reach the source of truth.

  1. Lesson 07

    The Database Depths

    The database is already a caching system. Here you tune rather than build, and an index usually beats a cache.

    Buffer poolIndexes
Interlude
Lessons 08–11

The Spirit Library

Learn the techniques that connect them.

  1. Lesson 08

    The Three Reading Techniques

    Cache-aside, read-through and refresh-ahead. Then the race that hits your database a thousand times for one value.

    Cache-asideSingle-flight
  2. Lesson 09

    The Three Writing Techniques

    Write-through, write-behind and write-around, and the honest question of what you can afford to lose.

    DurabilityBatching
  3. Lesson 10

    The Temple of Eviction

    Expiration removes old entries. Eviction makes room for new ones. Learn when to use each.

    LRULFUJitter
  4. Lesson 11

    The Invalidation Paradox

    Learn when to delete a cached entry, when to change its key, and how to handle browser copies you cannot purge.

    InvalidationVersioned keys
Book Five
Lessons 12–14

The Great War

Put every choice to the test.

  1. Lesson 12

    The Latency Lord's Attacks

    Explore five cache failure modes, from stampedes to poisoning. Add Bloom filters to the defenses against requests for nonexistent products.

    The trialFive defenses
  2. Lesson 13

    Restoring Balance

    Per-key hit ratios, the p99 tail, and the discipline of deleting a cache that no longer earns its place.

    p99What not to cache
  3. Lesson 14

    The Final Battle

    Bring the four realms together in one design, and explain each caching decision.

    RubricWorked example
"No single technique defeated him. He was defeated by someone who had measured first."
The end of Lesson 14
Start Lesson 1