import { L0CacheEntry, L0CacheStats } from '../types.js'; export interface L0CacheOptions { bytesLimit?: number; /** Estimate bytes for a value when computing budget */ byteEstimator?: (value: unknown) => number; } /** Generic L0 cache. Construct one per logical namespace (recall, vectors, etc.) */ export declare class L0Cache { private map; private bytesUsed; private bytesLimit; private byteEstimator; private hits; private misses; private evictions; private accessTimingsNs; constructor(opts?: L0CacheOptions); /** Get a value from the cache — sub-microsecond on hit */ get(key: string): T | undefined; /** Set a value — evicts LRU entries if over budget */ set(key: string, value: T): void; /** Check existence without touching LRU */ has(key: string): boolean; /** Remove a single entry */ delete(key: string): boolean; /** Clear all entries */ clear(): void; /** Get cache stats */ getStats(): L0CacheStats; /** Iterate entries (for warm-restart persistence) */ entries(): IterableIterator<[string, L0CacheEntry]>; /** Resize the byte budget — evicts if shrinking */ resize(newBytesLimit: number): void; private evictOldest; private recordTiming; } export declare function getCache(namespace: string, opts?: L0CacheOptions): L0Cache; export declare function getAllCacheStats(): Record; export declare function clearAllCaches(): void; //# sourceMappingURL=l0-cache.d.ts.map