/******************************************************************************** * Render/Layout/Component Cache Key Builders * * Cache key builders for render caching, layout components, error pages, * proxy manager, and query-aware cache keys. * * @module core/cache/keys/builders/render ********************************************************************************/ import type { QueryParamCacheOptions } from "../prefixes.js"; import { type RenderCompileMode } from "../render-compile-mode.js"; export declare function buildRenderCachePrefix(projectId: string, environment: "preview" | "production", releaseKey: string, /** * Compile mode of the render this prefix caches. It is required because * `environment` does not imply it: a local development server and a hosted * preview server share `preview`, the same branch and the same release key, * yet compile with different modes. The cached render carries a hydration * bundle and a page module, so without this segment a development-compiled * bundle can be served to a production-mode render. */ compileMode: RenderCompileMode, /** * Release asset manifest version currently being consumed for this render. * When set (a ready manifest is in use), it is folded into the prefix so * manifest-rewritten HTML is cached separately from JIT HTML. */ manifestVersion?: number): string; /** * Compute content source identifier for cache isolation. * * This is the SINGLE SOURCE OF TRUTH for contentSourceId computation. * Used by proxy to compute the value, and by fallback paths when proxy header is unavailable. * * @param isLocal - Whether this is a local development project * @param environment - "preview" or "production" * @param branch - Branch name (for preview/local modes) * @param releaseId - Release ID (required for production, ignored for preview/local) * @returns Content source ID string: * - Local: "local-{branch}" * - Preview: "preview-{branch}" * - Production: "release-{releaseId}" */ export declare function computeContentSourceId(isLocal: boolean, environment: "preview" | "production", branch: string | null | undefined, releaseId: string | null | undefined): string; export declare function buildRenderCacheKey(cachePrefix: string, contentKey: string): string; export declare function buildComponentCacheKey(projectId: string, filePath: string, contentHash: string, dependencyPinningCacheKey?: string, moduleServerOrigin?: string): string; export declare function buildLayoutComponentCacheKey(projectId: string, componentPath: string, hash: string, contentSourceId: string): string; export declare function buildErrorPageCacheKey(projectId: string | undefined, projectDir: string, pageType: string): string; export declare function buildProxyManagerCacheKey(projectSlug: string, productionMode: boolean, releaseId: string | null, branch: string | null, environmentName?: string | null, authority?: { projectId: string | null; credentialPrincipal: string; }): string; /** * Build a query-aware key that preserves query semantics for multi-tenant * caching. The result can contain internal `*HH` byte escapes; ApiCacheBackend * maps completed concrete keys to the API cache schema at its boundary. * * @param slug - Base page slug * @param url - Optional URL with query params * @param options - Query param handling options * @returns Cache key string */ export declare function buildQueryAwareCacheKey(slug: string, url?: URL, options?: QueryParamCacheOptions): string; //# sourceMappingURL=render.d.ts.map