/** * vapor-chamber — HTTP response cache + request deduplication * * Internal module used by createHttpClient. Not exported publicly. * * Cache entries carry a fresh window (`freshUntil`) and, when a caller opts * into `cache.staleTtl`, a longer stale window (`staleUntil >= freshUntil`). * Inside `freshUntil` → a fresh hit (no fetch). Between the two → a stale * hit: served instantly while the caller attaches a background revalidation * (see http.ts). Past `staleUntil` → a miss, but the entry is NOT deleted — * `getCachedAny` still finds it as a last resort for `cache.serveStaleOnError`. * Only LRU size pressure or an explicit `invalidateCacheByPattern` removes it. */ declare const CACHE_DEFAULT_TTL = 30000; type CacheEntry = { data: any; freshUntil: number; staleUntil: number; }; export type CacheHit = { data: any; stale: boolean; }; /** A fresh or stale hit; `null` on a plain miss. Never deletes on read. */ export declare function getCached(key: string): CacheHit | null; /** Last-resort lookup for `cache.serveStaleOnError` — ignores freshness entirely, never evicts. */ export declare function getCachedAny(key: string): CacheEntry | null; export declare function setCache(key: string, data: any, ttl?: number, staleTtl?: number): void; export declare function clearAllCache(): void; export declare function invalidateCacheByPattern(pattern: string | RegExp): void; export { CACHE_DEFAULT_TTL }; export declare function getInflight(key: string): Promise | undefined; export declare function setInflight(key: string, promise: Promise): void; //# sourceMappingURL=http-cache.d.ts.map