/** * CacheService - In-memory caching with TTL support * * Features: * - TTL (Time To Live) support * - Automatic cleanup of expired entries * - Type-safe cache operations * - Cache statistics */ interface CacheStats { hits: number; misses: number; size: number; hitRate: number; } export declare class CacheService { private static instance; private cache; private logger; private stats; private cleanupInterval; private readonly defaultTTL; private constructor(); static getInstance(): CacheService; /** * Get value from cache */ get(key: string): T | null; /** * Set value in cache with optional TTL */ set(key: string, value: T, ttlMs?: number): void; /** * Check if key exists and is not expired */ has(key: string): boolean; /** * Delete value from cache */ delete(key: string): boolean; /** * Clear all cache entries */ clear(): void; /** * Get or set pattern - fetch if not in cache */ getOrSet(key: string, fetcher: () => Promise, ttlMs?: number): Promise; /** * Get cache statistics */ getStats(): CacheStats; /** * Start automatic cleanup of expired entries */ private startCleanup; /** * Clean up expired entries */ private cleanup; /** * Stop cleanup interval (for testing/shutdown) */ stopCleanup(): void; } export {}; //# sourceMappingURL=CacheService.d.ts.map