Follow-up from #14300 (review box 5: a 304 under 5 ms, with no render work).
Today a signed-out page's 304 (by ETag or, behind the edge, by Last-Modified) is decided in src/web/layout.tspage() after the page is rendered: the tag is the hash of the bytes. /changelog already tags from what the page would say before it renders (src/web/pages/changelog.tscacheHeaders).
A forge-wide shortcut keyed on the write clock (http/repeat_reads.ts, as app tokens have) was tried in #14300 and backed out: signed-out pages read state the clock cannot see (the live-release keep in release/landings.ts is in memory; test/changelog-cache.test.ts "the tag changes when a release lands" fails with it), and the extra writeStamp read put /pricing over its statement budget (test/page-budget.test.ts).
Done when / and /explore each compute their tag from their inputs before rendering, as /changelog does, and a test asserts a held copy is a 304 without page() being called (spyOn the layout module).
Follow-up from #14300 (review box 5: a 304 under 5 ms, with no render work).
Today a signed-out page's 304 (by ETag or, behind the edge, by Last-Modified) is decided in
src/web/layout.tspage()after the page is rendered: the tag is the hash of the bytes. /changelog already tags from what the page would say before it renders (src/web/pages/changelog.tscacheHeaders).A forge-wide shortcut keyed on the write clock (
http/repeat_reads.ts, as app tokens have) was tried in #14300 and backed out: signed-out pages read state the clock cannot see (the live-release keep inrelease/landings.tsis in memory;test/changelog-cache.test.ts"the tag changes when a release lands" fails with it), and the extrawriteStampread put /pricing over its statement budget (test/page-budget.test.ts).Done when / and /explore each compute their tag from their inputs before rendering, as /changelog does, and a test asserts a held copy is a 304 without
page()being called (spyOn the layout module).