/** * In-memory cache storage */ import type { CacheEntry } from '../types'; import type { CacheStorage } from './cache-manager'; /** * In-memory cache storage implementation */ export declare class MemoryCache implements CacheStorage { private cache; /** * Gets a cache entry */ get(key: string): CacheEntry | null; /** * Sets a cache entry */ set(key: string, entry: CacheEntry): void; /** * Deletes a cache entry */ delete(key: string): void; /** * Clears all cache entries */ clear(): void; /** * Gets the number of cached entries */ size(): number; /** * Gets all cache keys */ keys(): string[]; /** * Gets all cache values */ values(): CacheEntry[]; /** * Gets all cache entries */ entries(): Array<[string, CacheEntry]>; /** * Checks if a key exists in cache */ has(key: string): boolean; /** * Iterates over cache entries */ forEach(callback: (entry: CacheEntry, key: string) => void): void; /** * Gets cache statistics */ getStats(): { size: number; memoryUsage: number; }; /** * Estimates the size of an object in bytes */ private estimateObjectSize; /** * Cleans up expired entries */ cleanup(): number; /** * Gets entries sorted by timestamp (oldest first) */ getEntriesByAge(): Array<[string, CacheEntry]>; /** * Removes oldest entries to free up space */ evictOldest(count: number): string[]; /** * Sets maximum cache size with LRU eviction */ setMaxSize(maxSize: number): void; /** * Gets cache hit ratio (requires tracking) */ getHitRatio(): number; /** * Exports cache data for serialization */ export(): Record; /** * Imports cache data from serialized format */ import(data: Record): void; /** * Creates a snapshot of current cache state */ snapshot(): Map; /** * Restores cache from a snapshot */ restore(snapshot: Map): void; } //# sourceMappingURL=memory-cache.d.ts.map