fix(api): Cache-Control: no-cache on dashboard HTML #148
Reference in New Issue
Block a user
Delete Branch "fix/dashboard-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GET /) returned the embedded HTML with noCache-Controlheader. With noLast-Modifiedeither, browsers fall back to heuristic caching and may serve the stale copy for a long time after a numa upgrade.numa --versionand thequeries.upstreamkey in/stats), but the rendered dashboard still matched a pre-v0.14.0 build — no Upstream row in Resolution Paths, and the zero-count filter wasn't kicking in. Both were dashboard changes that shipped weeks ago.Cache-Control: no-cacheon the dashboard response. Browsers will revalidate on every load; since there's no ETag the response is always re-delivered, but it's ~60KB served locally and only on page load (data refresh stays on/stats), so the cost is negligible.Test plan
cargo test api::tests::dashboard_returns_html— existing test now also asserts the headercargo fmt --checkcargo clippy --lib -- -D warningshttp://127.0.0.1:5380/in a browser that previously had the page open, confirm the new dashboard renders without a hard reloadCloses #144.