Exclude stale under 5 minutes from app shells#95833
Merged
Merged
Conversation
App Shells are meant to be useful for handling navigations that are not prefetched. If the stale time is very low then they must be evicted often from the client router and thus their utility is undermined. We now exclude caches that have a stale time under 5 minutes from app shells. For the default cacheLife profiles this means only the `seconds` profile is excluded becasue every other profile has a stale of exactly 5 minutes at this time. In the future we may want to allow for this threshhold to be configured. This shouldn't be too disruptive since generally content that is changing often is likely not in your app shell to begin with.
acdlite
approved these changes
Jul 15, 2026
gnoff
force-pushed
the
jstory/exclude-stale
branch
from
July 15, 2026 21:17
7fb7b4d to
4c414dc
Compare
Contributor
Stats from current PR🔴 1 regression
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (14 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsDiff too large to display app-page-exp..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsDiff too large to display app-page-tur..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsDiff too large to display app-page-tur..time.prod.jsDiff too large to display app-page.runtime.dev.jsDiff too large to display app-page.runtime.prod.jsDiff too large to display pages-api.ru..time.prod.jsDiff too large to display pages.runtime.prod.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display 📎 Tarball URLCommit: 4c414dc |
Contributor
Tests PassedCommit: 4c414dc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
App Shells are meant to be useful for handling navigations that are not prefetched. If the stale time is very low then they must be evicted often from the client router and thus their utility is undermined. We now exclude caches that have a stale time under 5 minutes from app shells.
For the default cacheLife profiles this means only the
secondsprofile is excluded becasue every other profile has a stale of exactly 5 minutes at this time.In the future we may want to allow for this threshhold to be configured. This shouldn't be too disruptive since generally content that is changing often is likely not in your app shell to begin with.