/** * Cache manager for API responses */ import type { CacheConfig, RequestConfig, ApiResponse, CacheEntry } from '../types'; /** * Interface for cache storage */ export interface CacheStorage { get(key: string): Promise | null> | CacheEntry | null; set(key: string, entry: CacheEntry): Promise | void; delete(key: string): Promise | void; clear(): Promise | void; size(): Promise | number; keys(): Promise | string[]; } /** * Cache manager for API responses */ export declare class CacheManager { private storage; private config; constructor(config: CacheConfig); /** * Gets a cached response */ get(config: RequestConfig): Promise | null>; /** * Sets a response in cache */ set(config: RequestConfig, response: ApiResponse): Promise; /** * Deletes a cached entry */ delete(config: RequestConfig): Promise; /** * Clears all cached entries */ clear(): Promise; /** * Invalidates cache entries based on pattern */ invalidate(pattern: string | RegExp): Promise; /** * Gets cache statistics */ getStats(): Promise<{ size: number; maxSize: number; hitRate: number; missRate: number; totalRequests: number; hits: number; misses: number; }>; /** * Updates cache configuration */ updateConfig(config: Partial): void; /** * Cleans up expired entries */ cleanup(): Promise; /** * Generates cache key for request */ private generateKey; /** * Checks if cache entry has expired */ private isExpired; /** * Enforces maximum cache size */ private enforceMaxSize; /** * Creates storage instance based on configuration */ private createStorage; } //# sourceMappingURL=cache-manager.d.ts.map