It’s either cached or it isn’t.
We believed it, too — hit or miss, there or not. But “cached” is not a state a page is in; it is a bake with a lifespan. use cache bakes a component’s output into the page’s static shell — one copy, served to everyone — and a cache tag is the handle you pull to throw that copy away. Pulling it empties the shelf and lights no oven. The fresh page is baked when the next request asks for one, and not a moment before.
The stamp below is that copy — this page’s own cache entry, wearing a six-character fingerprint so you can tell one bake from the next. Press the button and a fresh bake lands for every visitor, in the time it takes the label to change back. It feels like one event.
It is three. Flip the switch and run it again in slow motion — the panel narrates each event as it happens. Watch the color: it changes twice, not once, and that gap is what your cache logs are naming. Press the button here and the next request logs REVALIDATED — reason: tag-based deletion — because that request was the refill. STALE is the same gap handled softly: the old bake served while a fresh one is in the oven.
bake #70e737
- baked
- 27 Aug 2026, 02:43:39 UTC
- served
- from the static shell — the same entry every visitor gets
throws this page’s cache entry away and bakes a fresh one — for every visitor, immediately.
bake.ts + actions.ts + the ask
// bake.ts — the cache entry (lives in the static shell)
export async function getBake() {
"use cache";
cacheTag("landing-shell");
cacheLife("days");
return {
bakedAt: new Date().toISOString(),
id: crypto.randomUUID().slice(0, 6), // the fingerprint — and a CSS color
};
}
// actions.ts — the mutation
"use server";
export async function rebakeShell() {
updateTag("landing-shell"); // expires it now, for everyone
// The tag's expiry is stamped after this render finishes, so the bake in
// this response was cached for nobody. The next request makes the real one.
return { rebakedAt: new Date().toISOString() };
}
// rebake-panel.tsx — button two, the "ask"
router.refresh(); // no cache API anywhere — one more request for the page,
// indistinguishable from a new tab or another visitor