Μετάβαση στο περιεχόμενο

ICacheLogger

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

Defined in: packages/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 pino logger both fit. Without it, warnings go to console.warn with a [CacheDecorator]-style prefix. A logger that throws never changes a repository result.

@Cache<User, UserSnapshot>({
setKey: (user) => cacheKey(User.aggregateName, { id: user.id }),
logger: console,
})

warn(message): unknown

Defined in: packages/core/persistence/cache/cache-logger.ts:21

string

unknown