/** * Generic caching utility */ export interface CacheOptions { maxSize?: number; ttl?: number; } export interface CacheEntry { value: T; timestamp: number; hits: number; } /** * LRU (Least Recently Used) Cache with TTL support */ export declare class LRUCache { private cache; private maxSize; private ttl; constructor(options?: CacheOptions); /** * Get value from cache */ get(key: string): T | undefined; /** * Set value in cache */ set(key: string, value: T): void; /** * Check if key exists and is not expired */ has(key: string): boolean; /** * Delete entry */ delete(key: string): boolean; /** * Clear all entries */ clear(): void; /** * Get cache size */ size(): number; /** * Get cache statistics */ stats(): { size: number; maxSize: number; hitRate: number; entries: Array<{ key: string; hits: number; age: number; }>; }; /** * Check if entry is expired */ private isExpired; /** * Evict oldest/least used entry */ private evictOldest; /** * Clean up expired entries */ cleanup(): number; } /** * Hash a string for use as cache key */ export declare function hashKey(...parts: string[]): string; //# sourceMappingURL=cache.d.ts.map