File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed
packages/next/src/build/templates Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,6 @@ declare const nextConfig: NextConfigRuntime
3333// OPTIONAL_IMPORT:incrementalCacheHandler
3434// INJECT:nextConfig
3535
36- // Initialize the cache handlers interface.
37- initializeCacheHandlers ( nextConfig . cacheMaxMemorySize )
38-
3936const maybeJSONParse = ( str ?: string ) => ( str ? JSON . parse ( str ) : undefined )
4037
4138const rscManifest = self . __RSC_MANIFEST ?. [ 'VAR_PAGE' ]
@@ -88,6 +85,9 @@ async function requestHandler(
8885 routerServerContext,
8986 } = prepareResult
9087
88+ // Initialize the cache handlers interface.
89+ initializeCacheHandlers ( nextConfig . cacheMaxMemorySize )
90+
9191 const isPossibleServerAction = getIsPossibleServerAction ( req )
9292 const botType = getBotType ( req . headers . get ( 'User-Agent' ) || '' )
9393 const { isOnDemandRevalidate } = checkIsOnDemandRevalidate (
Original file line number Diff line number Diff line change @@ -35,15 +35,12 @@ declare const nextConfig: NextConfigRuntime
3535declare const pageRouteModuleOptions : any
3636declare const errorRouteModuleOptions : any
3737declare const user500RouteModuleOptions : any
38- // INJECT:nextConfig
39- // INJECT:pageRouteModuleOptions
40- // INJECT:errorRouteModuleOptions
41- // INJECT:user500RouteModuleOptions
38+ // INJECT:nextConfig
39+ // INJECT:pageRouteModuleOptions
40+ // INJECT:errorRouteModuleOptions
41+ // INJECT:user500RouteModuleOptions
4242
43- // Initialize the cache handlers interface.
44- initializeCacheHandlers ( nextConfig . cacheMaxMemorySize )
45-
46- // expose this for the route-module
43+ // expose this for the route-module
4744; ( globalThis as any ) . nextConfig = nextConfig
4845
4946const pageMod = {
@@ -119,6 +116,8 @@ async function requestHandler(
119116 dynamicCssManifest,
120117 } = prepareResult
121118
119+ initializeCacheHandlers ( nextConfig . cacheMaxMemorySize )
120+
122121 const renderContext : PagesRouteHandlerContext = {
123122 page : srcPage ,
124123 query,
You can’t perform that action at this time.
0 commit comments