export interface SchemaRevisionCacheOptions { /** Loads a value for a revision key. Called at most once per key per TTL window. */ fetch: (key: string) => Promise; /** LRU bound. Default 200. */ maxEntries?: number; /** Entry lifetime, so schema corrections get picked up. Default 1 hour. */ ttlMs?: number; now?: () => number; /** * Called once per lookup with whether it was served from cache. * * Reported from here rather than read back off `stats` afterwards because only this method knows * whether a given lookup cost a Schema Service call; a counter sampled later cannot attribute * individual lookups. */ onResult?: (result: "hit" | "miss") => void; } export interface SchemaCacheStats { hits: number; misses: number; } /** * Bounded, single-flight cache keyed by schema **revision id**. * * Keying by revision rather than schema name is the whole point: producers move between revisions * independently, so a name-keyed cache would decode a new revision's bytes against a stale writer * schema — silent corruption rather than a loud failure. */ export declare class SchemaRevisionCache { private readonly options; private readonly entries; private readonly inFlight; private readonly maxEntries; private readonly ttlMs; private readonly now; private hits; private misses; constructor(options: SchemaRevisionCacheOptions); get stats(): SchemaCacheStats; get(key: string): Promise; private store; } //# sourceMappingURL=cache.d.ts.map