Part 08 / Topic 5 of 7
The two separate decisions, made visible
Section 3's finding — a listed, prerendered PNR still streams its data fresh every time — is not a limitation, it's generateStaticParams and "use cache" doing two genuinely different jobs:
| Decision | What it controls | API |
|---|---|---|
| "Which URLs get a prerendered shell?" | Whether a request for this specific param gets the fast path (an existing [pnr].html reused as an App Shell) or has to render the shell fresh |
generateStaticParams |
| "Is the data inside a Suspense boundary baked into that shell?" | Whether the component's awaited result is computed once (at build or on first request, then reused) or recomputed every request |
"use cache" (Stage 3) |
Proof that the second decision alone is what was missing — added only for this one proof, then reverted, because the gap is this lesson's point, not the fix:
// app/status/lib/pnr.ts — NOT the harness's canonical state, proof only
export async function lookupPnr(pnr: string): Promise<PnrRecord | null> {
"use cache";
cacheLife("hours");
await wait(900);
return records[pnr] ?? null;
}
$ npm run build
...
├ ◐ /status/[pnr]
│ ├ ○ /status/2458001234 ← flipped from ◐
│ └ ○ /status/2458005678 ← flipped from ◐
$ grep -o "Karnataka Express" .next/server/app/status/2458001234.html
Karnataka Express
One line ("use cache") is the entire difference between "generateStaticParams gave this route a shell" and "this route is genuinely static." Section 5's rule, stated plainly: don't read ◐ as "half-done" or "not optimized yet." Read it as "this page's author made a deliberate choice to stream this part fresh" — which is exactly what this page's lesson wanted to demonstrate.
Full file: examples/04-rendering-trace.md — the complete trace table for both pages, the mini-build this part asks for.
Done here? The practice set for Part 8 — including the solutions — is on the part page.