/** * In-memory cache store with LRU eviction. * Suitable for single-instance deployments and development. * @module */ import type { CacheEntry, CacheStats, CacheStore } from './cache.types.js'; export interface MemoryCacheStoreOptions { /** Maximum number of entries before LRU eviction. @default 1000 */ maxEntries?: number; } /** * Simple in-memory cache store with LRU eviction. * Uses Map insertion order for LRU tracking. */ export declare class MemoryCacheStore implements CacheStore { private cache; private tagIndex; private readonly maxEntries; constructor(options?: MemoryCacheStoreOptions); /** * Retrieve an entry by key. * Uses Map's insertion order for LRU tracking - accessed entries are * deleted and re-inserted to move them to the "most recently used" position. */ get(key: string): Promise; /** * Store an entry, evicting the oldest if at capacity. * When maxEntries is reached and a new key is added, the first key in * the Map (oldest/least-recently-used) is evicted to make room. * Updating an existing key refreshes its LRU position. */ set(key: string, entry: CacheEntry): Promise; /** * Delete an entry and clean up its tag index references. * Removes empty tag sets to prevent memory leaks from accumulated tags. */ delete(key: string): Promise; invalidateByTags(tags: string[]): Promise; invalidateByPaths(paths: string[]): Promise; clear(): Promise; stats(): Promise; }