import type { CacheDriver } from '../CacheDriver.ts'; /** * Redis cache driver. Lazy-imports the redis connection helper (and thus * `@redis/client`) inside `#init`, so the package only loads when this driver is * constructed — i.e. only when `config('cache').driver === 'redis'`. Memory-only * apps never touch it, which keeps `@redis/client` an optional dependency. (The * `import type` above is erased at compile time and loads nothing at runtime.) * * Every call resolves the live client through the shared helper rather than * caching it: after a shutdown/reconnect the helper rebuilds the client, and its * single-flight connect avoids the "Socket already opened" race two concurrent * callers hit otherwise. */ declare class RedisDriver implements CacheDriver { #private; whenReady: Promise; constructor(); get(key: string): Promise; set(key: string, value: string, ttlSeconds: number): Promise; del(key: string): Promise; } export default RedisDriver;