/** * Cache service implementation with TTL and LRU strategy. */ import type { CollectionList } from "../models/collection.js"; import type { ModelList } from "../models/model.js"; import type { Prediction } from "../models/prediction.js"; export interface CacheStats { hits: number; misses: number; evictions: number; size: number; } export declare class Cache { private cache; private maxSize; private ttl; private stats; constructor(maxSize?: number, ttlSeconds?: number); /** * Set a value in the cache with TTL. */ set(key: string, value: T): void; /** * Get a value from the cache, considering TTL. */ get(key: string): T | null; /** * Remove a specific key from the cache. */ delete(key: string): void; /** * Clear all entries from the cache. */ clear(): void; /** * Get cache statistics. */ getStats(): CacheStats; /** * Warm up the cache with initial data. */ warmup(entries: [string, T][]): void; /** * Remove expired entries from the cache. */ cleanup(): number; /** * Get all valid (non-expired) keys in the cache. */ keys(): string[]; /** * Check if a key exists and is not expired. */ has(key: string): boolean; private evictOldest; } export declare const modelCache: Cache; export declare const predictionCache: Cache; export declare const collectionCache: Cache;