Optional
defaultTtl?: TimeSpan | nullYou can decide the default ttl value. If null is passed then no ttl will be used by default.
Optional
eventBus?: IEventBusOptional
lazyPromiseFactory?: Factory<AsyncLazy<any>, LazyPromise<any>>You can pass a Factory
of LazyPromise
to configure default settings for all LazyPromise
instances used in the Cache
class.
Optional
namespace?: NamespaceOptional
schema?: StandardSchemaV1<TType>You can provide any standard schema compliant object to validate all input and output data to ensure runtime type safety.
Optional
shouldValidateOutput?: booleanYou can enable validating cache values when retrieving them.
IMPORT_PATH:
"@daiso-tech/core/cache"