/** * Project-level CSS cache management. * * Manages per-project CSS caching using both local in-memory fallback * and distributed (API/Redis) backends. Provides cache-aside pattern * with automatic invalidation on content changes. * * @module html/styles-builder/project-css-cache */ interface ProjectCSSCacheEntry { css: string; hash: string; candidatesHash: string; } export interface ProjectCSSRequestContext { projectSlug: string; stylesheet: string; candidatesHash: string; profileHash: string; environment: string; cssPipelineIdentity: string; cacheKey: string; cacheEpoch: number; } interface ProjectCSSProfile { cssPipelineIdentity: string; minify?: boolean; environment?: string; buildMode?: "development" | "production"; } /** * Initialize project CSS distributed cache. * Call this at server startup alongside other distributed caches. * * @returns true if distributed backend was successfully initialized */ export declare function initializeProjectCSSCache(): Promise; /** * Check if distributed project CSS cache is enabled. */ export declare function isProjectCSSCacheDistributed(): boolean; export declare function createProjectCSSRequestContext(projectSlug: string, stylesheet: string, candidates: string[] | Set, profile: ProjectCSSProfile): ProjectCSSRequestContext; export declare function tryGetProjectCSSFromLocalFallback(context: ProjectCSSRequestContext, candidates: string[] | Set): Promise<{ css: string; hash: string; fromCache: true; } | undefined>; export declare function tryGetProjectCSSFromDistributedCache(context: ProjectCSSRequestContext, candidates: string[] | Set): Promise<{ css: string; hash: string; fromCache: true; } | undefined>; export declare function storeProjectCSS(context: ProjectCSSRequestContext, entry: ProjectCSSCacheEntry, candidates: string[] | Set): Promise; /** * Whether the project CSS distributed cache has been initialized. */ export declare function isProjectCSSInitialized(): boolean; /** * Invalidate project CSS cache for a specific project. */ export declare function invalidateProjectCSS(projectSlug: string): void; /** * Invalidate project CSS cache for a specific project (async version). */ export declare function invalidateProjectCSSAsync(projectSlug: string): Promise; export {}; //# sourceMappingURL=project-css-cache.d.ts.map