/** * Configuration options for synchronously setting up the cache module. */ export type CacheModuleOptions = { /** * Unique namespace to scope cache keys and avoid collisions. */ namespace: string; /** * The hostname or IP address of the cache server. */ host: string; /** * The port number on which the cache server listens. */ port: number; /** * Username for authenticating with the cache server. */ username: string; }; /** * Configuration options for asynchronously setting up the cache module. * * Allows dynamic or asynchronous retrieval of cache configuration, useful for loading * settings from environment variables, remote config servers, or secrets managers. */ export type CacheModuleAsyncOptions = { /** * Factory function that returns cache configuration options, either synchronously or asynchronously. * * @param args - Optional dependencies injected by the framework. * @returns CacheModuleOptions or a Promise resolving to CacheModuleOptions. */ useFactory: (...args: any[]) => Promise | CacheModuleOptions; /** * Optional list of providers or tokens to inject into the factory function. */ inject?: any[]; };