mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Tweaks the environment label logic to only use label things as `Prefetch` if there's a runtime prefetch config. If there's none, we label it as `Prefetchable` instead. --------- Co-authored-by: Josh Story <[email protected]>
28 lines
837 B
TypeScript
28 lines
837 B
TypeScript
import { Suspense } from 'react'
|
|
import { CachedData, UncachedFetch } from '../data-fetching'
|
|
import { PrivateCachedData, SuccessivePrivateCachedData } from './data-fetching'
|
|
|
|
const CACHE_KEY = '/private-cache/__PAGE__'
|
|
|
|
export default async function Page() {
|
|
return (
|
|
<main>
|
|
<h1>Warmup Dev Renders - private cache</h1>
|
|
|
|
<CachedData label="page" cacheKey={CACHE_KEY} />
|
|
|
|
<Suspense fallback="Loading private cache...">
|
|
<PrivateCachedData label="page" cacheKey={CACHE_KEY} />
|
|
</Suspense>
|
|
|
|
<Suspense fallback="Loading two successive private caches...">
|
|
<SuccessivePrivateCachedData label="page" cacheKey={CACHE_KEY} />
|
|
</Suspense>
|
|
|
|
<Suspense fallback="Loading uncached fetch...">
|
|
<UncachedFetch label="page" cacheKey={CACHE_KEY} />
|
|
</Suspense>
|
|
</main>
|
|
)
|
|
}
|