You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f513771
Browse filesBrowse the repository at this point in the historyBrowse files
Rework the flight-entry age gate: stamp adopted entries at boot, not consumption — the blanket CACHE_TIMEOUT bound still seeded the entry fetched-now, so a payload up to 180s old gained preload-grade freshness on any navigation; the entry now carries the payload's true age (its data is a fetch the server performed at render time) and the first consumption asks what the reuse condition would ask of a boot-time fetch: hydration/claim reads (no navigation in flight) adopt at any age since the server DOM was rendered from this exact value (#2964), back/forward honors the cache's 180s retention bar, and an active navigation or preload accepts only a payload young enough that a real preload would still satisfy it (PRELOAD_TIMEOUT), refetching otherwise
Copy file name to clipboardExpand all lines: .changeset/flight-entry-consumption-age-gate.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"@solidjs/router": patch
3
3
---
4
4
5
-
Bound hydration flight-entry adoption by the cache's own retention tolerance. `query()`'s keyed consumption path (`sharedConfig.has/load`) deliberately stays open past hydration `done` — a boundary inside a deferred claim scope (a lazy route module) can make its first call late and must adopt the promise the server DOM was rendered from — but adoption also stamps the seeded entry fresh (`cached[0] = now`, the burst-dedup window that lets preload + render share one consumption), so an entry first consumed long after load presented a minutes-old server value as fetched-now, masking its real age from the staleness logic entirely. Consumption is now gated on the flight payload being younger than `CACHE_TIMEOUT` (180s, the same bar the sweep applies to entries the router fetched itself): within the window behavior is unchanged, past it a first-ever call refetches instead of adopting.
5
+
Slot hydration flight-entry adoption into the cache's freshness model instead of granting it fetched-now freshness. `query()`'s keyed consumption path (`sharedConfig.has/load`) deliberately stays open past hydration `done` — a boundary inside a deferred claim scope (a lazy route module) can make its first call late and must adopt the promise the server DOM was rendered from (#2964) — but adoption used to stamp the seeded entry fresh, so a payload consumed on a client-side navigation minutes after load masqueraded as just-fetched for the staleness logic. The adopted payload is now treated as a fetch performed at boot: the entry is stamped with the payload's age (not consumption time), and adoption itself is gated per navigation intent — hydration and late claim reads (no navigation in flight) adopt at any age since server-DOM consistency wins; back/forward restores honor the payload within `CACHE_TIMEOUT` (180s, the cache's own retention bar); an active new navigation or preload accepts it only within `PRELOAD_TIMEOUT` (5s), exactly the window a real preload would get, and refetches otherwise. The hydration render burst still dedups through the normal window/count reuse (it happens within milliseconds of boot), and a preloaded-then-abandoned payload no longer satisfies a navigation that comes along after the window.
0 commit comments