/** * LRUCache - Least Recently Used cache for byte ranges * * Caches chunks of data keyed by source + byte range. * Automatically evicts least recently used entries when size limit reached. */ export declare class LRUCache { private cache; private maxSizeBytes; private currentSizeBytes; constructor(maxSizeMB?: number); /** * Generate a cache key from source key, offset, and length */ private makeKey; /** * Get data from cache if available */ get(sourceKey: string, offset: number, length: number): ArrayBuffer | null; /** * Store data in cache */ set(sourceKey: string, offset: number, length: number, data: ArrayBuffer): void; /** * Check if a range partially overlaps with cached data * Returns overlapping entries */ findOverlapping(sourceKey: string, offset: number, length: number): Array<{ offset: number; length: number; data: ArrayBuffer; }>; /** * Evict the least recently used entry */ private evictLRU; /** * Clear all cached data */ clear(): void; /** * Get current cache size in bytes */ getSize(): number; /** * Get number of entries in cache */ getEntryCount(): number; /** * When somebody last read bytes they were BLOCKED on, across every source * sharing this cache. * * It lives here rather than on a source because the readers that have to give * way are not the same object as the reader they give way to: playback and * the thumbnail pipeline are two FileSources over one file, sharing this * cache, and the thumbnail one has no other way to learn that a seek is * waiting on the disk. See FileSource.waitForDemandReads. */ private _lastDemandReadAt; markDemandRead(): void; msSinceDemandRead(): number; /** * Get cache utilization percentage */ getUtilization(): number; /** * Get maximum cache size in bytes */ getMaxSize(): number; /** * Get all cached byte ranges for a specific source * @param sourceKey The source key to get ranges for * @returns Array of {offset, length} byte ranges, sorted by offset */ getCachedRanges(sourceKey: string): Array<{ offset: number; length: number; }>; } //# sourceMappingURL=LRUCache.d.ts.map