import type { BroadcastState } from "./types.js"; /** * Generic LRU cache for aggregate state objects. * * Keyed by stream ID. Each entry stores the full state (with `_v` from the * event store). Used as the "previous state" baseline for computing patches, * and as the fast path for reconnects. * * The cache is shared between the broadcast hot path and read queries. * Projections should maintain their own cache to avoid double-apply bugs. */ export declare class StateCache { private cache; private maxSize; constructor(maxSize?: number); /** Get a cached state, promoting it to MRU position. */ get(key: string): S | undefined; /** Set a cached state, evicting the LRU entry if at capacity. */ set(key: string, state: S): void; /** Remove a cached entry. */ delete(key: string): void; /** Check if a key exists in the cache. */ has(key: string): boolean; /** Current number of cached entries. */ get size(): number; /** Direct access to the underlying map (for iteration). */ entries(): IterableIterator<[string, S]>; } //# sourceMappingURL=state-cache.d.ts.map