import { MemoryCache } from './MemoryCache'; import { PersistentCache } from './PersistentCache'; import { CacheConfig } from '../types'; export { MemoryCache } from './MemoryCache'; export { PersistentCache } from './PersistentCache'; export interface CacheInterface { set(key: string, value: T, ttlMs?: number): void | Promise; get(key: string): U | undefined | Promise; has(key: string): boolean | Promise; delete(key: string): boolean | Promise; clear(): void | Promise; size(): number | Promise; keys(): string[] | Promise; cleanup(): number | Promise; invalidatePattern(pattern: string | RegExp): number | Promise; getOrSet(key: string, factory: () => Promise, ttlMs?: number): Promise; } export declare class MultiLevelCache implements CacheInterface { private memoryCache; private persistentCache?; private config; constructor(config: CacheConfig, encryptionKey?: string); private startCleanupInterval; private getCacheKey; private getTTL; set(key: string, value: T, ttlMs?: number): void; get(key: string): T | undefined; has(key: string): boolean; delete(key: string): boolean; clear(): void; size(): number; keys(): string[]; cleanup(): number; invalidatePattern(pattern: string | RegExp): number; getOrSet(key: string, factory: () => Promise, ttlMs?: number): Promise; cacheOperation(operation: string, params: Record | undefined, factory: () => Promise): Promise; invalidateOperation(operation: string, params?: Record): void; invalidateRelated(operation: string, data?: Record): void; getStats(): { memory: ReturnType; persistent?: ReturnType; total: { size: number; hitRate?: number; }; }; preloadCache(operations: Array<{ operation: string; params?: Record; factory: () => Promise; }>): Promise; close(): void; } //# sourceMappingURL=index.d.ts.map