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
Caching for preloaded layouts routes not working #4112
When preloading a route (by hovering on a link for example), the preloaded data is kept in the cache for some time (default is 30 seconds) & no new requests will be made even when hovering on the same link again.
I noticed this behaviour doesn't work as expected when there's a layout in the preloaded route.
Check the reproduction example or the video below:
I've set the defaultStaleTime to 5 seconds, after those 5 seconds, every time I hover on the About link, the layout route loaded is invoked without being cached.
Hover over the 'About' link repeatedly and observe the console logs
You will see the Layout loader message appearing every time you hover on the link without any caching. (Where as the About loader is cached properly)
Expected behavior
The expected behaviour is for the layout routes loaders to be cached like normal routes pages.
The docs don't specify any special treatment for layouts AFAIK.
Activity
test: pin 24 community-reported issues fixed by the match-loading wor…
LadyBluenotes commentedon Jul 13, 2026
This is fixed on current main. Pathless layout loaders now remain cached alongside leaf loaders during repeated preloads within
preloadStaleTime.I verified the behaviour in both a focused core test and Chromium. #7744 also contains exact regression coverage, although that PR is still open
If this still occurs on the latest version, please open a new issue with an updated reproduction