Part 08 / Topic 7 of 7
When to choose what
Pulling sections 1–6 into one decision, in increasing order of cost:
| Choose | When | This part's example |
|---|---|---|
Fully static (○) |
Nothing in the component ever differs per request or per user | /status's own <h1> and search form |
Cached ("use cache", Stage 3) |
The data is shared across users/requests and expensive to recompute, but doesn't need to be instant-fresh | Section 5's proof-only patch to lookupPnr |
Streamed, uncached (<Suspense>, no cache directive) |
The data is cheap enough to recompute per request, or must never be stale, but doesn't need to block the whole page | PnrDetails in this part's own harness state, and every slow widget in Part 7 |
Fully dynamic (ƒ, not yet built in this course) |
The page must compute something before it can send any response — a real request-time 404/403, for instance |
Not built here; Stage 3/4 territory (Proxy-based checks, Route Handlers) |
The PNR checker in this part deliberately stays in the third row for its own data — the point was to make the gap between "has a shell" and "is actually static" visible, not to optimize it away. A real production version of this page would very likely add "use cache" with a short cacheLife once it existed — section 5 already proved that's a one-line change away.
Done here? The practice set for Part 8 — including the solutions — is on the part page.