fw-07 — Broader Ideas

Cache invalidation, the fourth encounter

Layout results, paint subsequences, computed values, and now module builds. Same rule, same failure: an incomplete key produces stale output with no error.

Having met it four times in different languages and layers, you should now reach for the same checklist whenever you add a cache: enumerate every input, include configuration and tool versions, and prefer an expensive-but-complete key over a cheap-but-partial one.

Author assertions carry risk

"sideEffects": false is a promise, and a wrong promise silently removes code. It is the same shape as a wrong patch flag (fw-06) and, one layer down, the same shape as {passive: true} lying.

Author-supplied guarantees are powerful because they are unverifiable — which is exactly why they are dangerous. Any system accepting such a promise should have a way to run without trusting it, for verification.

There is no universally right splitting strategy

First-load bytes and repeat-visit cache stability pull in opposite directions, and shared-chunk extraction couples invalidation. This is a product decision informed by your actual traffic mix.

The measurement that settles it — throttled time-to-interactive, one bundle versus your config — frequently surprises teams who split aggressively on principle.

Disposal is the hard half of hot reload

A module that registers a listener and never cleans up accumulates them on every update. This is fw-02's effect cleanup at module granularity: any system that re-runs code must define what "undo the previous run" means. Systems that skip that definition leak, in every language.

Next

fw-08 and fw-09 move from build-time to runtime concurrency — where the analogous silent failure is a stale response rather than a stale bundle.