/** * LRU Cache with TTL (Time-to-Live) support * Features: * - Least Recently Used eviction strategy * - TTL-based expiration * - Optional disk persistence */ import type { LRUCacheConfig, LRUCacheStats } from './cache-types.js'; export declare class LRUCache { private cache; private config; private stats; private persistentCache?; private totalAccessCount; constructor(config?: Partial); /** * Generate cache key from content using SHA-256 */ static generateKey(content: string): string; /** * Get value from cache */ get(key: string): T | undefined; /** * Set value in cache */ set(key: string, value: T): void; /** * Check if entry has expired */ private isExpired; /** * Evict least recently used entry * Since Map maintains insertion order, the first entry is the least recently used */ private evictLRU; /** * Clear all cache entries */ clear(): void; /** * Clean up expired entries */ cleanup(): number; /** * Get cache statistics */ getStats(): LRUCacheStats; /** * Update hit rate and average access count (O(1) complexity) */ private updateStats; /** * Load cache from disk */ private loadFromDisk; /** * Force save all entries to disk and wait for completion */ saveToDisk(): Promise; /** * Get cache size */ size(): number; /** * Check if key exists (without updating access time) */ has(key: string): boolean; } //# sourceMappingURL=lru-cache.d.ts.map