import { DynamicModule } from '@nestjs/common'; import { CacheModuleAsyncConfigOptions } from './domain/interfaces'; /** * Redis-based Cache configuration module. * * Registers Redis instances (master and optionally slave) using Keyv, * and exposes a high-level cache service via the `CLIENT_CACHE` token. * This allows performing operations like `get`, `set`, `del`, and `reset` * through a unified interface (`CacheServicePort`). * * Usage: * ```ts * @Injectable() * export class ExampleService { * constructor( * @Inject(CLIENT_CACHE) private readonly cacheService: CacheServicePort * ) {} * } * * */ export declare class CacheConfigModule { /** * @param options.cacheMaster Required. Primary Redis instance config (host, port, password, optional TLS). * @param options.cacheSlave Optional. Secondary (read-only) Redis instance config (same structure). * @param options.database Optional. Redis database index to use. Defaults to 0. * @param options.retryAttempts Optional. Number of retry attempts before failing. Defaults to 3. * @param options.retryDelay Optional. Delay (ms) between retries. Defaults to 2000ms. * @param options.isGlobal Optional. Whether to register the module globally. Defaults to false. * @returns A dynamic module that provides `CLIENT_CACHE` (as `CacheServicePort`). */ static configAsync(options: CacheModuleAsyncConfigOptions): DynamicModule; } //# sourceMappingURL=cache.module.d.ts.map