UNPKG

mem100x

Version:

⚡ The FASTEST MCP memory server ever built - 66k+ entities/sec with intelligent context detection

23 lines 782 B
/** * Unified cache interface for all cache implementations * Allows seamless switching between LRU, 2Q, ARC, and RadixTree caches */ export interface CacheStats { hits: number; misses: number; hitRate: number; size: number; [key: string]: any; } export interface ICache<K, V> { get(key: K): V | undefined; set(key: K, value: V): void; has(key: K): boolean; delete(key: K): boolean; clear(): void; getStats(): CacheStats; } export type CacheStrategy = 'lru' | '2q' | 'arc' | 'radix'; export declare function createCache<K, V>(strategy: CacheStrategy, maxSize: number): ICache<K, V>; export declare function createStringCache<V>(strategy: CacheStrategy, maxSize: number): ICache<string, V>; //# sourceMappingURL=cache-interface.d.ts.map