/** * Redis Cache Implementation * Provides distributed caching with TTL support */ import Redis from 'ioredis'; export interface RedisCacheOptions { defaultTTL: number; keyPrefix: string; retryStrategy?: (times: number) => number | null; } export declare class RedisCache { private redis; private defaultTTL; private keyPrefix; constructor(redisUrl: string, options?: Partial); /** * Get value from cache */ get(key: string): Promise; /** * Set value in cache with TTL */ set(key: string, value: any, ttl?: number): Promise; /** * Delete value from cache */ delete(key: string): Promise; /** * Check if key exists */ exists(key: string): Promise; /** * Get TTL for key */ getTTL(key: string): Promise; /** * Extend TTL for key */ touch(key: string, ttl?: number): Promise; /** * Clear all keys with prefix */ clear(): Promise; /** * Get cache statistics */ getStats(): Promise<{ totalKeys: number; memoryUsage: number; connected: boolean; }>; /** * Close Redis connection */ disconnect(): Promise; /** * Parse Redis memory info */ private parseMemoryInfo; /** * Get Redis client (for advanced operations) */ getClient(): Redis; } export default RedisCache;