/** * Redis caching layer for The Order * Implements caching for database queries, cache invalidation, and cache monitoring */ export interface CacheConfig { url?: string; ttl?: number; keyPrefix?: string; enableCompression?: boolean; } export interface CacheStats { hits: number; misses: number; sets: number; deletes: number; errors: number; } /** * Redis Cache Client */ export declare class CacheClient { private client; private config; private stats; constructor(config?: CacheConfig); /** * Initialize Redis client */ connect(): Promise; /** * Disconnect Redis client */ disconnect(): Promise; /** * Get value from cache */ get(key: string): Promise; /** * Set value in cache */ set(key: string, value: unknown, ttl?: number): Promise; /** * Delete value from cache */ delete(key: string): Promise; /** * Delete multiple keys by pattern */ invalidate(pattern: string): Promise; /** * Check if key exists */ exists(key: string): Promise; /** * Get cache statistics */ getStats(): CacheStats; /** * Reset cache statistics */ resetStats(): void; /** * Get full key with prefix */ private getFullKey; /** * Serialize value */ private serialize; /** * Deserialize value */ private deserialize; } export declare function getCacheClient(config?: CacheConfig): CacheClient; /** * Cache decorator for functions */ export declare function cached Promise>(fn: T, keyGenerator?: (...args: Parameters) => string, ttl?: number): T; //# sourceMappingURL=redis.d.ts.map