/** * Distributed namespaces owned by cache backends. Project invalidation is opt-in per * namespace and must parse that namespace's exact key schema. Merely owning a * prefix never makes opaque or content-addressed keys project-deletable. */ export declare const DistributedCacheNamespace: { readonly DEFAULT: "default"; readonly TRANSFORM: "transform"; readonly MODULE: "module"; readonly RENDER: "render"; readonly HTTP_MODULE: "http-module"; readonly SSR_MODULE: "ssr-module"; readonly PROJECT_CSS: "project-css"; readonly CSS: "css"; readonly CSS_INPUTS: "css-inputs"; readonly PREPARED_PROJECT_CSS: "prepared-project-css"; readonly SNIPPET: "snippet"; }; export type DistributedCacheEnvironment = "production" | "preview"; export interface DistributedCacheProjectIdentity { projectId?: string; projectSlug?: string; } export interface DistributedCacheKeyOwnership extends DistributedCacheProjectIdentity { environment?: DistributedCacheEnvironment; } export type DistributedCacheOwnershipMatcher = (keyWithoutNamespace: string) => DistributedCacheKeyOwnership | null; export interface DistributedCacheNamespaceDescriptor { readonly prefix: string; readonly matchProjectOwnership?: DistributedCacheOwnershipMatcher; } /** Matcher for render keys emitted by buildRenderCachePrefix. */ export declare const matchRenderCacheProjectOwnership: DistributedCacheOwnershipMatcher; export declare function validateDistributedCacheKeyPrefix(prefix: string): string; /** Validate a render namespace without mutating the ownership table. */ export declare function validateRenderDistributedCacheKeyPrefix(prefix: string): string; export declare function validateDistributedCacheProjectIdentity(identity: DistributedCacheProjectIdentity): DistributedCacheProjectIdentity; /** Build the canonical provider-neutral prefix used by distributed cache backends. */ export declare function buildDistributedCacheKeyPrefix(namespace?: string): string; /** * Register a cache-owned namespace. Configured namespaces without a matcher * remain discoverable as cache data but cannot participate in project scans or * deletion. Ownership is immutable after the first registration: allowing a * later caller to attach a matcher could reinterpret keys written by another * cache with a different schema. */ export declare function registerOwnedDistributedCacheNamespace(descriptor: DistributedCacheNamespaceDescriptor): void; /** * Register a namespace containing render-cache keys. */ export declare function registerRenderDistributedCacheNamespace(prefix: string): string; /** Register an opaque namespace without making it eligible for project invalidation. */ export declare function registerOwnedDistributedCacheKeyPrefix(prefix: string): void; /** Return longest prefixes first so nested configured namespaces match exactly. */ export declare function getOwnedDistributedCacheNamespaceDescriptors(): DistributedCacheNamespaceDescriptor[]; export declare function getOwnedDistributedCacheKeyPrefixes(): string[]; /** Escape the wildcard syntax shared by cache backend pattern operations. */ export declare function escapeCacheGlobLiteral(value: string): string; export declare function stripOwnedDistributedCacheKeyPrefix(key: string): string; //# sourceMappingURL=distributed-keyspace.d.ts.map