/home/techb158/balavpn.abdallabala.com/node_modules/next/dist/server/response-cache
NameSizeModeActions
index.d.ts33950666editdlrm
index.js153590666editdlrm
index.js.map244070666editdlrm
types.d.ts65340666editdlrm
types.js12450666editdlrm
types.js.map76330666editdlrm
utils.d.ts5400666editdlrm
utils.js42190666editdlrm
utils.js.map60500666editdlrm
web.d.ts7040666editdlrm
web.js41110666editdlrm
web.js.map63810666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/next/dist/server/response-cache/index.js.map (24407B)
{"version":3,"sources":["../../../src/server/response-cache/index.ts"],"sourcesContent":["import type {\n ResponseCacheEntry,\n ResponseGenerator,\n ResponseCacheBase,\n IncrementalResponseCacheEntry,\n IncrementalResponseCache,\n} from './types'\n\nimport { Batcher } from '../../lib/batcher'\nimport { LRUCache } from '../lib/lru-cache'\nimport { warnOnce } from '../../build/output/log'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport {\n fromResponseCacheEntry,\n routeKindToIncrementalCacheKind,\n toResponseCacheEntry,\n} from './utils'\nimport type { RouteKind } from '../route-kind'\n\n/**\n * Parses an environment variable as a positive integer, returning the fallback\n * if the value is missing, not a number, or not positive.\n */\nfunction parsePositiveInt(\n envValue: string | undefined,\n fallback: number\n): number {\n if (!envValue) return fallback\n const parsed = parseInt(envValue, 10)\n return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback\n}\n\n/**\n * Default TTL (in milliseconds) for minimal mode response cache entries.\n * Used for cache hit validation as a fallback for providers that don't\n * send the x-invocation-id header yet.\n *\n * 10 seconds chosen because:\n * - Long enough to dedupe rapid successive requests (e.g., page + data)\n * - Short enough to not serve stale data across unrelated requests\n *\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_TTL` environment variable.\n */\nconst DEFAULT_TTL_MS = parsePositiveInt(\n process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,\n 10_000\n)\n\n/**\n * Default maximum number of entries in the response cache.\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE` environment variable.\n */\nconst DEFAULT_MAX_SIZE = parsePositiveInt(\n process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,\n 150\n)\n\n/**\n * Separator used in compound cache keys to join pathname and invocationID.\n * Using null byte (\\0) since it cannot appear in valid URL paths or UUIDs.\n */\nconst KEY_SEPARATOR = '\\0'\n\n/**\n * Sentinel value used for TTL-based cache entries (when invocationID is undefined).\n * Chosen to be a clearly reserved marker for internal cache keys.\n */\nconst TTL_SENTINEL = '__ttl_sentinel__'\n\n/**\n * Entry stored in the LRU cache.\n */\ntype CacheEntry = {\n entry: IncrementalResponseCacheEntry | null\n /**\n * TTL expiration timestamp in milliseconds. Used as a fallback for\n * cache hit validation when providers don't send x-invocation-id.\n * Memory pressure is managed by LRU eviction rather than timers.\n */\n expiresAt: number\n}\n\n/**\n * Creates a compound cache key from pathname and invocationID.\n */\nfunction createCacheKey(\n pathname: string,\n invocationID: string | undefined\n): string {\n return `${pathname}${KEY_SEPARATOR}${invocationID ?? TTL_SENTINEL}`\n}\n\n/**\n * Extracts the invocationID from a compound cache key.\n * Returns undefined if the key used TTL_SENTINEL.\n */\nfunction extractInvocationID(compoundKey: string): string | undefined {\n const separatorIndex = compoundKey.lastIndexOf(KEY_SEPARATOR)\n if (separatorIndex === -1) return undefined\n\n const invocationID = compoundKey.slice(separatorIndex + 1)\n return invocationID === TTL_SENTINEL ? undefined : invocationID\n}\n\nexport * from './types'\n\nexport default class ResponseCache implements ResponseCacheBase {\n private readonly batcher = Batcher.create<\n { key: string; isOnDemandRevalidate: boolean },\n IncrementalResponseCacheEntry | null,\n string\n >({\n // Ensure on-demand revalidate doesn't block normal requests, it should be\n // safe to run an on-demand revalidate for the same key as a normal request.\n cacheKeyFn: ({ key, isOnDemandRevalidate }) =>\n `${key}-${isOnDemandRevalidate ? '1' : '0'}`,\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick,\n })\n\n private readonly revalidateBatcher = Batcher.create<\n string,\n IncrementalResponseCacheEntry | null\n >({\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick,\n })\n\n /**\n * LRU cache for minimal mode using compound keys (pathname + invocationID).\n * This allows multiple invocations to cache the same pathname without\n * overwriting each other's entries.\n */\n private readonly cache: LRUCache\n\n /**\n * Set of invocation IDs that have had cache entries evicted.\n * Used to detect when the cache size may be too small.\n * Bounded to prevent memory growth.\n */\n private readonly evictedInvocationIDs: Set = new Set()\n\n /**\n * The configured max size, stored for logging.\n */\n private readonly maxSize: number\n\n /**\n * The configured TTL for cache entries in milliseconds.\n */\n private readonly ttl: number\n\n // we don't use minimal_mode name here as this.minimal_mode is\n // statically replace for server runtimes but we need it to\n // be dynamic here\n private minimal_mode?: boolean\n\n constructor(\n minimal_mode: boolean,\n maxSize: number = DEFAULT_MAX_SIZE,\n ttl: number = DEFAULT_TTL_MS\n ) {\n this.minimal_mode = minimal_mode\n this.maxSize = maxSize\n this.ttl = ttl\n\n // Create the LRU cache with eviction tracking\n this.cache = new LRUCache(maxSize, undefined, (compoundKey) => {\n const invocationID = extractInvocationID(compoundKey)\n if (invocationID) {\n // Bound to 100 entries to prevent unbounded memory growth.\n // FIFO eviction is acceptable here because:\n // 1. Invocations are short-lived (single request lifecycle), so older\n // invocations are unlikely to still be active after 100 newer ones\n // 2. This warning mechanism is best-effort for developer guidance—\n // missing occasional eviction warnings doesn't affect correctness\n // 3. If a long-running invocation is somehow evicted and then has\n // another cache entry evicted, it will simply be re-added\n if (this.evictedInvocationIDs.size >= 100) {\n const first = this.evictedInvocationIDs.values().next().value\n if (first) this.evictedInvocationIDs.delete(first)\n }\n this.evictedInvocationIDs.add(invocationID)\n }\n })\n }\n\n public async get(\n key: string | null,\n responseGenerator: ResponseGenerator,\n context: {\n routeKind: RouteKind\n isOnDemandRevalidate?: boolean\n isPrefetch?: boolean\n incrementalCache: IncrementalResponseCache\n isRoutePPREnabled?: boolean\n isFallback?: boolean\n waitUntil?: (prom: Promise) => void\n\n /**\n * The invocation ID from the infrastructure. Used to scope the\n * in-memory cache to a single revalidation request in minimal mode.\n */\n invocationID?: string\n }\n ): Promise {\n // If there is no key for the cache, we can't possibly look this up in the\n // cache so just return the result of the response generator.\n if (!key) {\n return responseGenerator({\n hasResolved: false,\n previousCacheEntry: null,\n })\n }\n\n // Check minimal mode cache before doing any other work.\n if (this.minimal_mode) {\n const cacheKey = createCacheKey(key, context.invocationID)\n const cachedItem = this.cache.get(cacheKey)\n\n if (cachedItem) {\n // With invocationID: exact match found - always a hit\n // With TTL mode: must check expiration\n if (context.invocationID !== undefined) {\n return toResponseCacheEntry(cachedItem.entry)\n }\n\n // TTL mode: check expiration\n const now = Date.now()\n if (cachedItem.expiresAt > now) {\n return toResponseCacheEntry(cachedItem.entry)\n }\n\n // TTL expired - clean up\n this.cache.remove(cacheKey)\n }\n\n // Warn if this invocation had entries evicted - indicates cache may be too small.\n if (\n context.invocationID &&\n this.evictedInvocationIDs.has(context.invocationID)\n ) {\n warnOnce(\n `Response cache entry was evicted for invocation ${context.invocationID}. ` +\n `Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`\n )\n }\n }\n\n const {\n incrementalCache,\n isOnDemandRevalidate = false,\n isFallback = false,\n isRoutePPREnabled = false,\n isPrefetch = false,\n waitUntil,\n routeKind,\n invocationID,\n } = context\n\n const response = await this.batcher.batch(\n { key, isOnDemandRevalidate },\n (_cacheKey, resolve) => {\n const promise = this.handleGet(\n key,\n responseGenerator,\n {\n incrementalCache,\n isOnDemandRevalidate,\n isFallback,\n isRoutePPREnabled,\n isPrefetch,\n routeKind,\n invocationID,\n },\n resolve\n )\n\n // we need to ensure background revalidates are\n // passed to waitUntil\n if (waitUntil) {\n waitUntil(promise)\n }\n return promise\n }\n )\n\n return toResponseCacheEntry(response)\n }\n\n /**\n * Handles the get request for the response cache.\n *\n * @param key - The key to get the response cache entry for.\n * @param responseGenerator - The response generator to use to generate the response cache entry.\n * @param context - The context for the get request.\n * @param resolve - The resolve function to use to resolve the response cache entry.\n * @returns The response cache entry.\n */\n private async handleGet(\n key: string,\n responseGenerator: ResponseGenerator,\n context: {\n incrementalCache: IncrementalResponseCache\n isOnDemandRevalidate: boolean\n isFallback: boolean\n isRoutePPREnabled: boolean\n isPrefetch: boolean\n routeKind: RouteKind\n invocationID: string | undefined\n },\n resolve: (value: IncrementalResponseCacheEntry | null) => void\n ): Promise {\n let previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null =\n null\n let resolved = false\n\n try {\n // Get the previous cache entry if not in minimal mode\n previousIncrementalCacheEntry = !this.minimal_mode\n ? await context.incrementalCache.get(key, {\n kind: routeKindToIncrementalCacheKind(context.routeKind),\n isRoutePPREnabled: context.isRoutePPREnabled,\n isFallback: context.isFallback,\n })\n : null\n\n if (previousIncrementalCacheEntry && !context.isOnDemandRevalidate) {\n resolve(previousIncrementalCacheEntry)\n resolved = true\n\n if (!previousIncrementalCacheEntry.isStale || context.isPrefetch) {\n // The cached value is still valid, so we don't need to update it yet.\n return previousIncrementalCacheEntry\n }\n }\n\n // Revalidate the cache entry\n const incrementalResponseCacheEntry = await this.revalidate(\n key,\n context.incrementalCache,\n context.isRoutePPREnabled,\n context.isFallback,\n responseGenerator,\n previousIncrementalCacheEntry,\n previousIncrementalCacheEntry !== null && !context.isOnDemandRevalidate,\n undefined,\n context.invocationID\n )\n\n // Handle null response\n if (!incrementalResponseCacheEntry) {\n // Remove the cache item if it was set so we don't use it again.\n if (this.minimal_mode) {\n const cacheKey = createCacheKey(key, context.invocationID)\n this.cache.remove(cacheKey)\n }\n return null\n }\n\n // Resolve for on-demand revalidation or if not already resolved\n if (context.isOnDemandRevalidate && !resolved) {\n return incrementalResponseCacheEntry\n }\n\n return incrementalResponseCacheEntry\n } catch (err) {\n // If we've already resolved the cache entry, we can't reject as we\n // already resolved the cache entry so log the error here.\n if (resolved) {\n console.error(err)\n return null\n }\n\n throw err\n }\n }\n\n /**\n * Revalidates the cache entry for the given key.\n *\n * @param key - The key to revalidate the cache entry for.\n * @param incrementalCache - The incremental cache to use to revalidate the cache entry.\n * @param isRoutePPREnabled - Whether the route is PPR enabled.\n * @param isFallback - Whether the route is a fallback.\n * @param responseGenerator - The response generator to use to generate the response cache entry.\n * @param previousIncrementalCacheEntry - The previous cache entry to use to revalidate the cache entry.\n * @param hasResolved - Whether the response has been resolved.\n * @param waitUntil - Optional function to register background work.\n * @param invocationID - The invocation ID for cache key scoping.\n * @returns The revalidated cache entry.\n */\n public async revalidate(\n key: string,\n incrementalCache: IncrementalResponseCache,\n isRoutePPREnabled: boolean,\n isFallback: boolean,\n responseGenerator: ResponseGenerator,\n previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null,\n hasResolved: boolean,\n waitUntil?: (prom: Promise) => void,\n invocationID?: string\n ) {\n return this.revalidateBatcher.batch(key, () => {\n const promise = this.handleRevalidate(\n key,\n incrementalCache,\n isRoutePPREnabled,\n isFallback,\n responseGenerator,\n previousIncrementalCacheEntry,\n hasResolved,\n invocationID\n )\n\n // We need to ensure background revalidates are passed to waitUntil.\n if (waitUntil) waitUntil(promise)\n\n return promise\n })\n }\n\n private async handleRevalidate(\n key: string,\n incrementalCache: IncrementalResponseCache,\n isRoutePPREnabled: boolean,\n isFallback: boolean,\n responseGenerator: ResponseGenerator,\n previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null,\n hasResolved: boolean,\n invocationID: string | undefined\n ) {\n try {\n // Generate the response cache entry using the response generator.\n const responseCacheEntry = await responseGenerator({\n hasResolved,\n previousCacheEntry: previousIncrementalCacheEntry,\n isRevalidating: true,\n })\n if (!responseCacheEntry) {\n return null\n }\n\n // Convert the response cache entry to an incremental response cache entry.\n const incrementalResponseCacheEntry = await fromResponseCacheEntry({\n ...responseCacheEntry,\n isMiss: !previousIncrementalCacheEntry,\n })\n\n // We want to persist the result only if it has a cache control value\n // defined.\n if (incrementalResponseCacheEntry.cacheControl) {\n if (this.minimal_mode) {\n // Set TTL expiration for cache hit validation. Entries are validated\n // by invocationID when available, with TTL as a fallback for providers\n // that don't send x-invocation-id. Memory is managed by LRU eviction.\n const cacheKey = createCacheKey(key, invocationID)\n this.cache.set(cacheKey, {\n entry: incrementalResponseCacheEntry,\n expiresAt: Date.now() + this.ttl,\n })\n } else {\n await incrementalCache.set(key, incrementalResponseCacheEntry.value, {\n cacheControl: incrementalResponseCacheEntry.cacheControl,\n isRoutePPREnabled,\n isFallback,\n })\n }\n }\n\n return incrementalResponseCacheEntry\n } catch (err) {\n // When a path is erroring we automatically re-set the existing cache\n // with new revalidate and expire times to prevent non-stop retrying.\n if (previousIncrementalCacheEntry?.cacheControl) {\n const revalidate = Math.min(\n Math.max(\n previousIncrementalCacheEntry.cacheControl.revalidate || 3,\n 3\n ),\n 30\n )\n const expire =\n previousIncrementalCacheEntry.cacheControl.expire === undefined\n ? undefined\n : Math.max(\n revalidate + 3,\n previousIncrementalCacheEntry.cacheControl.expire\n )\n\n await incrementalCache.set(key, previousIncrementalCacheEntry.value, {\n cacheControl: { revalidate: revalidate, expire: expire },\n isRoutePPREnabled,\n isFallback,\n })\n }\n\n // We haven't resolved yet, so let's throw to indicate an error.\n throw err\n }\n }\n}\n"],"names":["ResponseCache","parsePositiveInt","envValue","fallback","parsed","parseInt","Number","isFinite","DEFAULT_TTL_MS","process","env","NEXT_PRIVATE_RESPONSE_CACHE_TTL","DEFAULT_MAX_SIZE","NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE","KEY_SEPARATOR","TTL_SENTINEL","createCacheKey","pathname","invocationID","extractInvocationID","compoundKey","separatorIndex","lastIndexOf","undefined","slice","constructor","minimal_mode","maxSize","ttl","batcher","Batcher","create","cacheKeyFn","key","isOnDemandRevalidate","schedulerFn","scheduleOnNextTick","revalidateBatcher","evictedInvocationIDs","Set","cache","LRUCache","size","first","values","next","value","delete","add","get","responseGenerator","context","hasResolved","previousCacheEntry","cacheKey","cachedItem","toResponseCacheEntry","entry","now","Date","expiresAt","remove","has","warnOnce","incrementalCache","isFallback","isRoutePPREnabled","isPrefetch","waitUntil","routeKind","response","batch","_cacheKey","resolve","promise","handleGet","previousIncrementalCacheEntry","resolved","kind","routeKindToIncrementalCacheKind","isStale","incrementalResponseCacheEntry","revalidate","err","console","error","handleRevalidate","responseCacheEntry","isRevalidating","fromResponseCacheEntry","isMiss","cacheControl","set","Math","min","max","expire"],"mappings":";;;;+BA0GA;;;eAAqBA;;;;yBAlGG;0BACC;qBACA;2BACU;uBAK5B;qBAwFO;;;;;;;;;;;;;;AArFd;;;CAGC,GACD,SAASC,iBACPC,QAA4B,EAC5BC,QAAgB;IAEhB,IAAI,CAACD,UAAU,OAAOC;IACtB,MAAMC,SAASC,SAASH,UAAU;IAClC,OAAOI,OAAOC,QAAQ,CAACH,WAAWA,SAAS,IAAIA,SAASD;AAC1D;AAEA;;;;;;;;;;CAUC,GACD,MAAMK,iBAAiBP,iBACrBQ,QAAQC,GAAG,CAACC,+BAA+B,EAC3C;AAGF;;;CAGC,GACD,MAAMC,mBAAmBX,iBACvBQ,QAAQC,GAAG,CAACG,oCAAoC,EAChD;AAGF;;;CAGC,GACD,MAAMC,gBAAgB;AAEtB;;;CAGC,GACD,MAAMC,eAAe;AAerB;;CAEC,GACD,SAASC,eACPC,QAAgB,EAChBC,YAAgC;IAEhC,OAAO,GAAGD,WAAWH,gBAAgBI,gBAAgBH,cAAc;AACrE;AAEA;;;CAGC,GACD,SAASI,oBAAoBC,WAAmB;IAC9C,MAAMC,iBAAiBD,YAAYE,WAAW,CAACR;IAC/C,IAAIO,mBAAmB,CAAC,GAAG,OAAOE;IAElC,MAAML,eAAeE,YAAYI,KAAK,CAACH,iBAAiB;IACxD,OAAOH,iBAAiBH,eAAeQ,YAAYL;AACrD;AAIe,MAAMlB;IAuDnByB,YACEC,YAAqB,EACrBC,UAAkBf,gB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