import { CacheService } from './cache.service'; /** * Cache warmup configuration */ export interface CacheWarmupConfig { /** Warmup task name */ name: string; /** Function to generate cache data */ dataProvider: () => Promise | any; /** Cache key or key generator */ key: string | ((data: any) => string); /** Cache TTL */ ttl?: number; /** Cache layers to use */ layers?: string[]; /** Number of items to process in parallel */ batchSize?: number; /** Whether this warmup is critical (fail if it fails) */ critical?: boolean; } /** * Cache warmup result */ export interface CacheWarmupResult { name: string; success: boolean; itemCount: number; duration: number; errors: string[]; } /** * Cache warmup service * * Provides functionality to warm up cache with data before serving requests */ export declare class CacheWarmupService { private readonly cacheService; private readonly logger; private warmupConfigs; constructor(cacheService: CacheService); /** * Register warmup configurations for a group */ registerWarmup(groupName: string, configs: CacheWarmupConfig[]): void; /** * Execute warmup for a specific group */ warmupGroup(groupName: string): Promise; /** * Execute warmup for all registered groups */ warmupAll(): Promise>; /** * Get warmup statistics */ getWarmupStats(): { totalGroups: number; totalTasks: number; taskDetails: any[]; }; /** * Remove warmup configuration */ removeWarmupGroup(groupName: string): boolean; /** * Clear all warmup configurations */ clearWarmupConfigs(): void; /** * Execute a single warmup task */ private executeWarmupTask; }