/** * @nahisaho/yata-scale - Cache Manager * * Coordinates multi-tier caching (L1/L2/L3) */ import { type Result } from 'neverthrow'; import type { CacheConfig, CacheStats, Entity, Relationship } from '../types.js'; import { CacheMissError } from '../errors.js'; import { L1Cache } from './L1Cache.js'; import { L2Cache } from './L2Cache.js'; import { L3Cache } from './L3Cache.js'; import { InvalidationManager } from './InvalidationManager.js'; /** * Cache manager for multi-tier caching */ export declare class CacheManager { private readonly l1; private readonly l2; private readonly l3; private readonly invalidation; private readonly config; constructor(config: CacheConfig); /** * Get entity with cache hierarchy */ getEntity(id: string): Promise>; /** * Set entity in cache */ setEntity(entity: Entity): Promise; /** * Delete entity from all tiers */ deleteEntity(id: string): Promise; /** * Get relationship with cache hierarchy */ getRelationship(id: string): Promise>; /** * Set relationship in cache */ setRelationship(relationship: Relationship): Promise; /** * Delete relationship from all tiers */ deleteRelationship(id: string): Promise; /** * Get multiple entities */ getEntities(ids: string[]): Promise>; /** * Set multiple entities */ setEntities(entities: Entity[]): Promise; /** * Handle invalidation event */ private handleInvalidation; /** * Invalidate entity across all tiers */ invalidateEntity(id: string): void; /** * Invalidate multiple entities */ invalidateEntities(ids: string[]): void; /** * Flush invalidations */ flushInvalidations(): void; /** * Prewarm cache with entities */ prewarm(entities: Entity[]): Promise; /** * Clear all caches */ clear(): Promise; /** * Perform tier demotion (move cold data down) */ performDemotion(): Promise; /** * Get statistics for all tiers */ getAllStats(): { l1: CacheStats; l2: CacheStats; l3: CacheStats; }; /** * Get combined statistics */ getCombinedStats(): CacheStats; /** * Get L1 cache */ getL1(): L1Cache; /** * Get L2 cache */ getL2(): L2Cache; /** * Get L3 cache */ getL3(): L3Cache; /** * Get invalidation manager */ getInvalidationManager(): InvalidationManager; /** * Close the cache manager */ close(): Promise; } //# sourceMappingURL=CacheManager.d.ts.map