/** * Simple in-memory LRU cache implementation with TTL support */ export interface CacheOptions { /** Maximum number of items to store in the cache (default: 100) */ maxSize?: number; /** Default TTL for cache entries in milliseconds (default: 5 minutes) */ defaultTTL?: number; } export declare class LRUCache { private cache; private maxSize; private defaultTTL; /** * Creates a new LRU cache with optional size and TTL configuration * @param options Cache configuration options */ constructor(options?: CacheOptions); /** * Set a value in the cache with an optional TTL * @param key Cache key * @param value Value to cache * @param ttl Optional TTL in milliseconds (overrides default) */ set(key: string, value: T, ttl?: number): void; /** * Get a value from the cache if it exists and hasn't expired * @param key Cache key to retrieve * @returns The cached value or undefined if not found or expired */ get(key: string): T | undefined; /** * Check if a key exists in the cache and hasn't expired * @param key Cache key to check * @returns True if the key exists and hasn't expired */ has(key: string): boolean; /** * Delete a key from the cache * @param key Cache key to delete */ delete(key: string): void; /** Clear all items from the cache */ clear(): void; /** Get the current number of items in the cache */ get size(): number; /** * Remove all expired entries from the cache * @private */ private cleanExpired; /** * Evict the least recently used item from the cache * @private */ private evictLRU; } //# sourceMappingURL=cache.d.ts.map