import type { CacheAdapter, CacheItem, MapCacheAdapterOptions } from './types.ts'; /** * Map-based cache adapter with LRU eviction and background cleanup. * * Provides cache operations using a Map with: * - LRU eviction when maxSize is reached * - Background cleanup of expired entries * - Access statistics tracking * * All methods are async to conform to CacheAdapter interface, * but operations are synchronous internally for performance. * * @example * const adapter = new MapCacheAdapter({ maxSize: 500, cleanupInterval: 30000 }); * await adapter.set('key', item, Date.now() + 60000); * const cached = await adapter.get('key'); */ export declare class MapCacheAdapter implements CacheAdapter { constructor(opts?: MapCacheAdapterOptions); get(key: string): Promise | null>; set(key: string, value: CacheItem, _expiresAt?: number): Promise; delete(key: string): Promise; clear(): Promise; has(key: string): Promise; /** * Sync iterator over all cache keys. * Kept for memoize compatibility. */ keys(): IterableIterator; /** * Sync iterator over all cache entries. * Kept for memoize compatibility. */ entries(): IterableIterator<[string, CacheItem]>; get size(): number; /** * Gets eviction statistics. * * @returns Object with eviction count */ getStats(): { evictions: number; size: number; }; /** * Manually trigger cleanup of expired entries. */ cleanupExpired(): void; }