| Server IP : 159.203.156.69 / Your IP : 216.73.217.172 Web Server : nginx/1.24.0 System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/tanviranik.com/node_modules/vinext/dist/server/ |
Upload File : |
{"version":3,"file":"app-page-cache.js","names":[],"sources":["../../src/server/app-page-cache.ts"],"sourcesContent":["import type { CachedAppPageValue, CacheControlMetadata } from \"vinext/shims/cache\";\nimport { VINEXT_RSC_VARY_HEADER } from \"./app-rsc-cache-busting.js\";\nimport { buildCachedRevalidateCacheControl } from \"./cache-control.js\";\nimport { VINEXT_CACHE_HEADER, VINEXT_MOUNTED_SLOTS_HEADER } from \"./headers.js\";\nimport { buildAppPageCacheValue, type ISRCacheEntry } from \"./isr-cache.js\";\nimport { mergeMiddlewareResponseHeaders } from \"./middleware-response-headers.js\";\nimport { readStreamAsText } from \"../utils/text-stream.js\";\nimport { encodeCacheTag } from \"../utils/encode-cache-tag.js\";\nimport type { AppRscRenderMode } from \"./app-rsc-render-mode.js\";\n\ntype AppPageDebugLogger = (event: string, detail: string) => void;\ntype AppPageCacheGetter = (key: string) => Promise<ISRCacheEntry | null>;\ntype AppPageCacheSetter = (\n key: string,\n data: CachedAppPageValue,\n revalidateSeconds: number,\n tags: string[],\n expireSeconds?: number,\n) => Promise<void>;\ntype AppPageBackgroundRegenerator = (key: string, renderFn: () => Promise<void>) => void;\ntype AppPageRequestCacheLife = {\n revalidate?: number;\n expire?: number;\n};\n\ntype AppPageCacheRenderResult = {\n cacheControl?: CacheControlMetadata;\n html: string;\n rscData: ArrayBuffer;\n tags: string[];\n};\n\ntype BuildAppPageCachedResponseOptions = {\n cacheControl?: CacheControlMetadata;\n cacheState: \"HIT\" | \"STALE\";\n expireSeconds?: number;\n isRscRequest: boolean;\n middlewareHeaders?: Headers | null;\n middlewareStatus?: number | null;\n mountedSlotsHeader?: string | null;\n revalidateSeconds: number;\n};\n\ntype ReadAppPageCacheResponseOptions = {\n cleanPathname: string;\n clearRequestContext: () => void;\n isRscRequest: boolean;\n isrDebug?: AppPageDebugLogger;\n isrGet: AppPageCacheGetter;\n isrHtmlKey: (pathname: string) => string;\n isrRscKey: (\n pathname: string,\n mountedSlotsHeader?: string | null,\n renderMode?: AppRscRenderMode,\n ) => string;\n isrSet: AppPageCacheSetter;\n middlewareHeaders?: Headers | null;\n middlewareStatus?: number | null;\n mountedSlotsHeader?: string | null;\n renderMode?: AppRscRenderMode;\n expireSeconds?: number;\n revalidateSeconds: number;\n renderFreshPageForCache: () => Promise<AppPageCacheRenderResult>;\n scheduleBackgroundRegeneration: AppPageBackgroundRegenerator;\n};\n\ntype FinalizeAppPageHtmlCacheResponseOptions = {\n capturedDynamicUsageBeforeContextCleanup?: () => boolean;\n capturedRscDataPromise: Promise<ArrayBuffer> | null;\n cleanPathname: string;\n consumeDynamicUsage: () => boolean;\n getPageTags: () => string[];\n getRequestCacheLife?: () => AppPageRequestCacheLife | null;\n isrDebug?: AppPageDebugLogger;\n isrHtmlKey: (pathname: string) => string;\n isrRscKey: (\n pathname: string,\n mountedSlotsHeader?: string | null,\n renderMode?: AppRscRenderMode,\n ) => string;\n isrSet: AppPageCacheSetter;\n preserveClientResponseHeaders?: boolean;\n expireSeconds?: number;\n revalidateSeconds: number | null;\n waitUntil?: (promise: Promise<void>) => void;\n};\n\ntype ScheduleAppPageRscCacheWriteOptions = {\n capturedRscDataPromise: Promise<ArrayBuffer> | null;\n cleanPathname: string;\n consumeDynamicUsage: () => boolean;\n dynamicUsedDuringBuild: boolean;\n getPageTags: () => string[];\n getRequestCacheLife?: () => AppPageRequestCacheLife | null;\n isrDebug?: AppPageDebugLogger;\n isrRscKey: (\n pathname: string,\n mountedSlotsHeader?: string | null,\n renderMode?: AppRscRenderMode,\n ) => string;\n isrSet: AppPageCacheSetter;\n mountedSlotsHeader?: string | null;\n renderMode?: AppRscRenderMode;\n preserveClientResponseHeaders?: boolean;\n expireSeconds?: number;\n revalidateSeconds: number | null;\n waitUntil?: (promise: Promise<void>) => void;\n};\n\nconst NO_STORE_CACHE_CONTROL = \"no-store, must-revalidate\";\n\nexport function buildAppPageCacheTags(pathname: string, extraTags: readonly string[]): string[] {\n const tags = [pathname, `_N_T_${pathname}`, \"_N_T_/layout\"];\n const segments = pathname.split(\"/\");\n let built = \"\";\n for (let index = 1; index < segments.length; index++) {\n const segment = segments[index];\n if (segment) {\n built += `/${segment}`;\n tags.push(`_N_T_${built}/layout`);\n }\n }\n\n tags.push(`_N_T_${built}/page`);\n for (const tag of extraTags) {\n if (!tags.includes(tag)) {\n tags.push(tag);\n }\n }\n // Canonicalise to ASCII-safe form so path-derived tags from non-ASCII\n // pathnames match what `revalidatePath`/`revalidateTag` produce after\n // their own encoding pass.\n return tags.map(encodeCacheTag);\n}\n\nfunction buildAppPageCacheControl(\n cacheState: BuildAppPageCachedResponseOptions[\"cacheState\"],\n revalidateSeconds: number,\n expireSeconds?: number,\n): string {\n return buildCachedRevalidateCacheControl(cacheState, revalidateSeconds, expireSeconds);\n}\n\nfunction buildAppPageCachedHeaders(options: {\n cacheControl: string;\n cacheState: BuildAppPageCachedResponseOptions[\"cacheState\"];\n contentType: string;\n middlewareHeaders?: Headers | null;\n mountedSlotsHeader?: string | null;\n}): Headers {\n const headers = new Headers({\n \"Cache-Control\": options.cacheControl,\n \"Content-Type\": options.contentType,\n Vary: VINEXT_RSC_VARY_HEADER,\n [VINEXT_CACHE_HEADER]: options.cacheState,\n });\n\n if (options.mountedSlotsHeader) {\n headers.set(VINEXT_MOUNTED_SLOTS_HEADER, options.mountedSlotsHeader);\n }\n\n mergeMiddlewareResponseHeaders(headers, options.middlewareHeaders ?? null);\n return headers;\n}\n\nfunction getCachedAppPageValue(entry: ISRCacheEntry | null): CachedAppPageValue | null {\n return entry?.value.value && entry.value.value.kind === \"APP_PAGE\" ? entry.value.value : null;\n}\n\nfunction resolveAppPageCacheWritePolicy(options: {\n expireSeconds?: number;\n requestCacheLife?: AppPageRequestCacheLife | null;\n revalidateSeconds: number | null;\n}): { expireSeconds?: number; revalidateSeconds: number } | null {\n let revalidateSeconds = options.revalidateSeconds;\n let expireSeconds = options.expireSeconds;\n const requestCacheLife = options.requestCacheLife;\n\n if (requestCacheLife?.revalidate !== undefined) {\n revalidateSeconds =\n revalidateSeconds === null\n ? requestCacheLife.revalidate\n : Math.min(revalidateSeconds, requestCacheLife.revalidate);\n }\n if (requestCacheLife?.expire !== undefined) {\n expireSeconds = requestCacheLife.expire;\n }\n\n if (revalidateSeconds === null || revalidateSeconds <= 0 || !Number.isFinite(revalidateSeconds)) {\n return null;\n }\n\n return { expireSeconds, revalidateSeconds };\n}\n\nexport function buildAppPageCachedResponse(\n cachedValue: CachedAppPageValue,\n options: BuildAppPageCachedResponseOptions,\n): Response | null {\n // Preserve the legacy fallback semantics from the generated entry: invalid\n // falsy statuses still fall back to 200 rather than being forwarded through.\n const status = options.middlewareStatus ?? (cachedValue.status || 200);\n const revalidateSeconds = options.cacheControl?.revalidate ?? options.revalidateSeconds;\n const expireSeconds =\n options.cacheControl === undefined\n ? undefined\n : (options.cacheControl.expire ?? options.expireSeconds);\n const cacheControl = buildAppPageCacheControl(\n options.cacheState,\n revalidateSeconds,\n expireSeconds,\n );\n if (options.isRscRequest) {\n if (!cachedValue.rscData) {\n return null;\n }\n\n const rscHeaders = buildAppPageCachedHeaders({\n cacheControl,\n cacheState: options.cacheState,\n contentType: \"text/x-component; charset=utf-8\",\n middlewareHeaders: options.middlewareHeaders,\n mountedSlotsHeader: options.mountedSlotsHeader,\n });\n\n return new Response(cachedValue.rscData, {\n status,\n headers: rscHeaders,\n });\n }\n\n if (typeof cachedValue.html !== \"string\" || cachedValue.html.length === 0) {\n return null;\n }\n\n const htmlHeaders = buildAppPageCachedHeaders({\n cacheControl,\n cacheState: options.cacheState,\n contentType: \"text/html; charset=utf-8\",\n middlewareHeaders: options.middlewareHeaders,\n });\n\n return new Response(cachedValue.html, {\n status,\n headers: htmlHeaders,\n });\n}\n\nexport async function readAppPageCacheResponse(\n options: ReadAppPageCacheResponseOptions,\n): Promise<Response | null> {\n const isrKey = options.isRscRequest\n ? options.isrRscKey(options.cleanPathname, options.mountedSlotsHeader, options.renderMode)\n : options.isrHtmlKey(options.cleanPathname);\n\n try {\n const cached = await options.isrGet(isrKey);\n const cachedValue = getCachedAppPageValue(cached);\n\n if (cachedValue && !cached?.isStale) {\n const hitResponse = buildAppPageCachedResponse(cachedValue, {\n cacheState: \"HIT\",\n cacheControl: cached?.value.cacheControl,\n expireSeconds: options.expireSeconds,\n isRscRequest: options.isRscRequest,\n middlewareHeaders: options.middlewareHeaders,\n middlewareStatus: options.middlewareStatus,\n mountedSlotsHeader: options.mountedSlotsHeader,\n revalidateSeconds: options.revalidateSeconds,\n });\n\n if (hitResponse) {\n options.isrDebug?.(\n options.isRscRequest ? \"HIT (RSC)\" : \"HIT (HTML)\",\n options.cleanPathname,\n );\n options.clearRequestContext();\n return hitResponse;\n }\n\n options.isrDebug?.(\"MISS (empty cached entry)\", options.cleanPathname);\n }\n\n if (cached?.isStale && cachedValue) {\n const regenerationKey = options.isRscRequest\n ? options.isrRscKey(options.cleanPathname, options.mountedSlotsHeader, options.renderMode)\n : options.isrHtmlKey(options.cleanPathname);\n\n // Preserve the legacy behavior from the inline generator: stale entries\n // still trigger background regeneration even if this request cannot use\n // the stale payload and will fall through to a fresh render.\n options.scheduleBackgroundRegeneration(regenerationKey, async () => {\n const revalidatedPage = await options.renderFreshPageForCache();\n const revalidateSeconds =\n revalidatedPage.cacheControl?.revalidate ?? options.revalidateSeconds;\n const expireSeconds = revalidatedPage.cacheControl?.expire ?? options.expireSeconds;\n const writes = [\n options.isrSet(\n options.isrRscKey(\n options.cleanPathname,\n options.mountedSlotsHeader,\n options.renderMode,\n ),\n buildAppPageCacheValue(\"\", revalidatedPage.rscData, 200),\n revalidateSeconds,\n revalidatedPage.tags,\n expireSeconds,\n ),\n ];\n\n if (!options.isRscRequest) {\n // HTML cache is slot-state-independent (canonical), so only refresh it\n // during HTML-triggered regens. RSC-triggered regens only update the\n // requesting client's RSC slot variant; a stale HTML cache entry will\n // be regenerated independently by the next full-page HTML request.\n writes.push(\n options.isrSet(\n options.isrHtmlKey(options.cleanPathname),\n buildAppPageCacheValue(revalidatedPage.html, undefined, 200),\n revalidateSeconds,\n revalidatedPage.tags,\n expireSeconds,\n ),\n );\n }\n\n await Promise.all(writes);\n options.isrDebug?.(\"regen complete\", options.cleanPathname);\n });\n\n const staleResponse = buildAppPageCachedResponse(cachedValue, {\n cacheState: \"STALE\",\n cacheControl: cached.value.cacheControl,\n expireSeconds: options.expireSeconds,\n isRscRequest: options.isRscRequest,\n middlewareHeaders: options.middlewareHeaders,\n middlewareStatus: options.middlewareStatus,\n mountedSlotsHeader: options.mountedSlotsHeader,\n revalidateSeconds: options.revalidateSeconds,\n });\n\n if (staleResponse) {\n options.isrDebug?.(\n options.isRscRequest ? \"STALE (RSC)\" : \"STALE (HTML)\",\n options.cleanPathname,\n );\n options.clearRequestContext();\n return staleResponse;\n }\n\n options.isrDebug?.(\"STALE MISS (empty stale entry)\", options.cleanPathname);\n }\n\n if (!cached) {\n options.isrDebug?.(\"MISS (no cache entry)\", options.cleanPathname);\n }\n } catch (isrReadError) {\n console.error(\"[vinext] ISR cache read error:\", isrReadError);\n }\n\n return null;\n}\n\nexport function finalizeAppPageHtmlCacheResponse(\n response: Response,\n options: FinalizeAppPageHtmlCacheResponseOptions,\n): Response {\n if (!response.body) {\n return response;\n }\n\n const [streamForClient, streamForCache] = response.body.tee();\n const htmlKey = options.isrHtmlKey(options.cleanPathname);\n const rscKey = options.isrRscKey(options.cleanPathname, null);\n const clientHeaders = new Headers(response.headers);\n if (options.preserveClientResponseHeaders !== true) {\n // HTML Server Components can access request APIs while the stream is being\n // consumed. Until that late dynamic check finishes, downstream shared caches\n // must not cache a response whose ISR policy was known before streaming.\n clientHeaders.set(\"Cache-Control\", NO_STORE_CACHE_CONTROL);\n clientHeaders.set(VINEXT_CACHE_HEADER, \"MISS\");\n }\n\n const cachePromise = (async () => {\n try {\n const cachedHtml = await readStreamAsText(streamForCache);\n\n if (\n options.capturedDynamicUsageBeforeContextCleanup?.() === true ||\n options.consumeDynamicUsage()\n ) {\n options.isrDebug?.(\"HTML cache write skipped (dynamic usage during render)\", htmlKey);\n return;\n }\n\n const cachePolicy = resolveAppPageCacheWritePolicy({\n expireSeconds: options.expireSeconds,\n requestCacheLife: options.getRequestCacheLife?.(),\n revalidateSeconds: options.revalidateSeconds,\n });\n if (!cachePolicy) {\n options.isrDebug?.(\"HTML cache write skipped (no cache policy)\", htmlKey);\n return;\n }\n\n const pageTags = options.getPageTags();\n const writes = [\n options.isrSet(\n htmlKey,\n buildAppPageCacheValue(cachedHtml, undefined, 200),\n cachePolicy.revalidateSeconds,\n pageTags,\n cachePolicy.expireSeconds,\n ),\n ];\n\n if (options.capturedRscDataPromise) {\n writes.push(\n options.capturedRscDataPromise.then((rscData) =>\n options.isrSet(\n rscKey,\n buildAppPageCacheValue(\"\", rscData, 200),\n cachePolicy.revalidateSeconds,\n pageTags,\n cachePolicy.expireSeconds,\n ),\n ),\n );\n }\n\n await Promise.all(writes);\n options.isrDebug?.(\"HTML cache written\", htmlKey);\n } catch (cacheError) {\n console.error(\"[vinext] ISR cache write error:\", cacheError);\n }\n })();\n\n options.waitUntil?.(cachePromise);\n\n return new Response(streamForClient, {\n status: response.status,\n statusText: response.statusText,\n headers: clientHeaders,\n });\n}\n\nexport function finalizeAppPageRscCacheResponse(\n response: Response,\n options: ScheduleAppPageRscCacheWriteOptions,\n): Response {\n const didSchedule = scheduleAppPageRscCacheWrite(options);\n if (!didSchedule) {\n return response;\n }\n\n if (options.preserveClientResponseHeaders === true) {\n return response;\n }\n\n const clientHeaders = new Headers(response.headers);\n // RSC payloads are also streamed lazily. Until the captured stream proves no\n // late request API was used, the client-facing MISS response must not enter a\n // shared cache when the ISR policy was known before streaming.\n clientHeaders.set(\"Cache-Control\", NO_STORE_CACHE_CONTROL);\n clientHeaders.set(VINEXT_CACHE_HEADER, \"MISS\");\n\n return new Response(response.body, {\n status: response.status,\n statusText: response.statusText,\n headers: clientHeaders,\n });\n}\n\nexport function scheduleAppPageRscCacheWrite(\n options: ScheduleAppPageRscCacheWriteOptions,\n): boolean {\n const capturedRscDataPromise = options.capturedRscDataPromise;\n if (!capturedRscDataPromise || options.dynamicUsedDuringBuild) {\n return false;\n }\n\n const rscKey = options.isrRscKey(\n options.cleanPathname,\n options.mountedSlotsHeader,\n options.renderMode,\n );\n const cachePromise = (async () => {\n try {\n const rscData = await capturedRscDataPromise;\n\n // Two-phase dynamic detection:\n // 1. dynamicUsedDuringBuild catches searchParams-driven opt-in before the\n // RSC response is sent.\n // 2. consumeDynamicUsage() here catches APIs that fire while the RSC\n // stream is consumed (headers(), cookies(), noStore()).\n if (options.consumeDynamicUsage()) {\n options.isrDebug?.(\"RSC cache write skipped (dynamic usage during render)\", rscKey);\n return;\n }\n\n const cachePolicy = resolveAppPageCacheWritePolicy({\n expireSeconds: options.expireSeconds,\n requestCacheLife: options.getRequestCacheLife?.(),\n revalidateSeconds: options.revalidateSeconds,\n });\n if (!cachePolicy) {\n options.isrDebug?.(\"RSC cache write skipped (no cache policy)\", rscKey);\n return;\n }\n\n await options.isrSet(\n rscKey,\n buildAppPageCacheValue(\"\", rscData, 200),\n cachePolicy.revalidateSeconds,\n options.getPageTags(),\n cachePolicy.expireSeconds,\n );\n options.isrDebug?.(\"RSC cache written\", rscKey);\n } catch (cacheError) {\n console.error(\"[vinext] ISR RSC cache write error:\", cacheError);\n }\n })();\n\n options.waitUntil?.(cachePromise);\n return true;\n}\n"],"mappings":";;;;;;;;AA6GA,MAAM,yBAAyB;AAE/B,SAAgB,sBAAsB,UAAkB,WAAwC;CAC9F,MAAM,OAAO;EAAC;EAAU,Q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