mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
The experimental `appShells` flag was added while the feature was being developed. It was not meant to be a public-facing flag. Some of the behavior that was gated behind the `appShells` flag is purely an optimization and can be landed without any gate. There are also some behaviors that we don't want to turn on unless you've opted into the new prefetching model via Partial Prefetching. Arguably these too are internal optimizations, but because they can change the number of requests that are made to the server (e.g. one request for the shell, another for the page data), we will gate these behind Partial Prefetching to minimize the impact on existing applications. The result is that until you opt into Partial Prefetching, you should not see any meaningfully detrimental impact to prefetching costs, regardless of how your app is structured.
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { LinkAccordion } from '../components/link-accordion'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<>
|
|
<p>
|
|
This page is used to test various scenarios related to prefetch cache
|
|
staleness. In the corresponding e2e test, the links below are prefetched
|
|
(by toggling their visibility), time is elapsed, and then prefetched
|
|
again to check whether a new network request is made.
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<LinkAccordion href="/stale-2-minutes">
|
|
Page with stale time of 2 minutes
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion href="/stale-4-minutes">
|
|
Page with stale time of 4 minutes
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion href="/runtime-stale-2-minutes" prefetch>
|
|
Page whose runtime prefetch has a stale time of 2 minutes
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion href="/runtime-stale-4-minutes" prefetch>
|
|
Page whose runtime prefetch has a stale time of 4 minutes
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion href="/dynamic">Page with dynamic data</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion href="/seconds">
|
|
Page with cached data with <code>cacheLife("seconds")</code>
|
|
</LinkAccordion>
|
|
</li>
|
|
</ul>
|
|
</>
|
|
)
|
|
}
|