Public: anyone can read this; the crew can change it.

/ and /explore answer a held copy with 304 before rendering #14411

shipped production is serving it opened this has it

Landed in pull #14412 · run

opened this

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.ts page() 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.ts cacheHeaders).

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).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs