import { CacheProvider, CacheStats, RedisCacheOptions } from '../interfaces'; /** * Redis cache provider implementation */ export declare class RedisCache implements CacheProvider { private client; private options; private isConnected; private stats; private logger; /** * Creates a new RedisCache instance * @param options Redis cache options */ constructor(options?: RedisCacheOptions); /** * Get a prefixed key * @param key Original key * @returns Prefixed key */ private getKey; /** * Log a cache operation if logging is enabled * @param level Log level * @param message Message to log * @param data Additional data to log */ private log; /** * Get a value from the cache * @param key Cache key * @returns Promise resolving to the cached value or undefined if not found */ get(key: string): Promise; /** * Set a value in the cache * @param key Cache key * @param value Value to cache * @param ttl Time-to-live in milliseconds (optional) * @returns Promise resolving to true if successful */ set(key: string, value: T, ttl?: number): Promise; /** * Delete a value from the cache * @param key Cache key * @returns Promise resolving to true if successful */ delete(key: string): Promise; /** * Check if a key exists in the cache * @param key Cache key * @returns Promise resolving to true if the key exists */ has(key: string): Promise; /** * Clear all values from the cache (with the same prefix) * @returns Promise resolving to true if successful */ clear(): Promise; /** * Get multiple values from the cache * @param keys Array of cache keys * @returns Promise resolving to a map of key-value pairs for found items */ getMany(keys: string[]): Promise>; /** * Set multiple values in the cache * @param entries Map of key-value pairs to cache * @param ttl Time-to-live in milliseconds (optional) * @returns Promise resolving to true if successful */ setMany(entries: Map, ttl?: number): Promise; /** * Delete multiple values from the cache * @param keys Array of cache keys to delete * @returns Promise resolving to true if successful */ deleteMany(keys: string[]): Promise; /** * Get the Time-To-Live (TTL) for a cache key * @param key Cache key * @returns Promise resolving to TTL in milliseconds, or undefined if not found */ getTtl(key: string): Promise; /** * Update the Time-To-Live (TTL) for a cache key * @param key Cache key * @param ttl New TTL in milliseconds * @returns Promise resolving to true if successful */ updateTtl(key: string, ttl: number): Promise; /** * Increment a numeric value in the cache * @param key Cache key * @param increment Amount to increment (default: 1) * @returns Promise resolving to the new value */ increment(key: string, increment?: number): Promise; /** * Decrement a numeric value in the cache * @param key Cache key * @param decrement Amount to decrement (default: 1) * @returns Promise resolving to the new value */ decrement(key: string, decrement?: number): Promise; /** * Connect to the Redis server * @returns Promise resolving when connected */ connect(): Promise; /** * Disconnect from the Redis server * @returns Promise resolving when disconnected */ disconnect(): Promise; /** * Get cache stats * @returns Promise resolving to cache statistics */ getStats(): Promise; } //# sourceMappingURL=redis-cache.d.ts.map