fix(server): scope no-cache to HTML pages (fix web-e2e cycle gate) #102

Merged
funman300 merged 1 commits from fix/cache-scope-html-only into master 2026-06-24 16:46:36 +00:00
Owner

The blanket Cache-Control: no-cache from #99 broke the web-e2e cycle regression gate (240 page reloads -> wasm recompiled each time -> 30s bridge timeout; green at #98, red since #99).

Scope no-cache to the include_str! HTML routes only (the real staleness source). /web + /assets keep ServeDir Last-Modified caching, so repeated loads reuse the compiled wasm and the gate is fast again. HTML freshness unchanged.

Should turn web-e2e green on the next merge.

The blanket Cache-Control: no-cache from #99 broke the web-e2e cycle regression gate (240 page reloads -> wasm recompiled each time -> 30s bridge timeout; green at #98, red since #99). Scope no-cache to the include_str! HTML routes only (the real staleness source). /web + /assets keep ServeDir Last-Modified caching, so repeated loads reuse the compiled wasm and the gate is fast again. HTML freshness unchanged. Should turn web-e2e green on the next merge.
funman300 added 1 commit 2026-06-24 16:46:25 +00:00
The blanket `no-cache` from the earlier fix (#99) regressed the web-e2e cycle
regression gate: it reloads /play-classic 240 times, and with no-cache the
browser re-validated and recompiled the wasm on every load, blowing past the
30s bridge-ready timeout (green at #98, red from #99 onward).

Scope no-cache to just the `include_str!` HTML routes (which change on every
deploy and have no validators — the actual staleness source). The `/web` +
`/assets` ServeDir keep their default Last-Modified caching, so repeated page
loads reuse the downloaded/compiled wasm and the cycle gate is fast again. HTML
freshness — the fix Rhys needed — is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
funman300 merged commit a5902ac0af into master 2026-06-24 16:46:36 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#102