ICacheLogger
Defined in: packages/ddd-core/persistence/cache/cache-logger.ts:20
Receives the operational warnings of the cache decorators and adapters, such as a failed cache write or a miswired repository.
Pass one through the logger option to route these warnings into an
application’s logging. console and a NestJS Logger both fit. Without it,
warnings go to console.warn with a [CacheDecorator]-style prefix. A logger
that throws never changes a repository result.
Example
Section titled “Example”@Cache<User, UserSnapshot>({ setKey: (user) => cacheKey(User.aggregateName, { id: user.id }), logger: new Logger('UserCache'), // NestJS})Methods
Section titled “Methods”warn()
Section titled “warn()”warn(
message):unknown
Defined in: packages/ddd-core/persistence/cache/cache-logger.ts:21
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”unknown