/** * Simple in-memory cache with TTL support for IBGE API requests */ import { type RetryOptions } from "./retry.js"; declare class RequestCache { private cache; private defaultTTL; constructor(defaultTTLMinutes?: number); /** * Get cached data if available and not expired */ get(key: string): T | null; /** * Store data in cache with optional TTL */ set(key: string, data: T, ttlMinutes?: number): void; /** * Check if a key exists and is not expired */ has(key: string): boolean; /** * Remove a specific key from cache */ delete(key: string): void; /** * Clear all cached data */ clear(): void; /** * Remove all expired entries */ cleanup(): void; /** * Get cache statistics */ stats(): { size: number; keys: string[]; }; } export declare const cache: RequestCache; export declare const CACHE_TTL: { readonly STATIC: number; readonly MEDIUM: 60; readonly SHORT: 15; readonly REALTIME: 1; }; /** * Generate cache key from URL and parameters */ export declare function cacheKey(base: string, params?: Record): string; /** * Fetch with cache support and automatic retry on network failures */ export declare function cachedFetch(url: string, cacheKeyStr: string, ttlMinutes?: number, retryOptions?: RetryOptions): Promise; export {}; //# sourceMappingURL=cache.d.ts.map