import type { ResponseContext } from './interceptors.js'; import type { CacheEvictionReason, CacheStore } from './cache-store.js'; export interface InMemoryCacheStoreConfig { maxEntries: number; maxMemoryBytes: number; onEvict?: (reason: CacheEvictionReason) => void; } export interface InMemoryCacheStoreStats { entries: number; maxEntries: number; memoryBytes: number; maxMemoryBytes: number; } /** * In-memory LRU cache with TTL and memory budget guardrails. * * Why this exists: plain Map-based caches can grow without bound and exhaust memory. */ export declare class InMemoryCacheStore implements CacheStore { private readonly config; private entries; private memoryBytes; constructor(config: InMemoryCacheStoreConfig); get(key: string, nowMs?: number): ResponseContext | undefined; set(key: string, response: ResponseContext, ttlSeconds: number, nowMs?: number): void; delete(key: string): boolean; clear(): void; getStats(): InMemoryCacheStoreStats; private touch; private removeExpired; private evictUntilWithinBudget; private removeEntry; private estimateEntrySize; } //# sourceMappingURL=in-memory-cache-store.d.ts.map