Type Alias CacheFactorySettings<TAdapters>

CacheFactorySettings<TAdapters>: {
    adapters: CacheAdapters<TAdapters>;
    backoffPolicy?: BackoffPolicy | null;
    defaultAdapter?: NoInfer<TAdapters>;
    defaultTtl?: TimeSpan;
    eventBus?: IGroupableEventBus<any>;
    retryAttempts?: number | null;
    retryPolicy?: RetryPolicy | null;
    serde: OneOrMore<IFlexibleSerde>;
    shouldRegisterErrors?: boolean;
    shouldRegisterEvents?: boolean;
    timeout?: TimeSpan | null;
}

IMPORT_PATH: "@daiso-tech/core/cache/implementations/derivables"

Type Parameters

  • TAdapters extends string = string

Type declaration

  • adapters: CacheAdapters<TAdapters>
  • OptionalbackoffPolicy?: BackoffPolicy | null

    The default backof policy to use in the returned LazyPromise.

    {null}
    
  • OptionaldefaultAdapter?: NoInfer<TAdapters>
  • OptionaldefaultTtl?: TimeSpan

    You can decide the default ttl value. If null is passed then no ttl will be used and that's the default.

  • OptionaleventBus?: IGroupableEventBus<any>
    new EventBus({
    adapter: new MemoryEventBusAdapter({
    rootGroup: "@global"
    })
    })
  • OptionalretryAttempts?: number | null

    The default retry attempt to use in the returned LazyPromise.

    {null}
    
  • OptionalretryPolicy?: RetryPolicy | null

    The default retry policy to use in the returned LazyPromise.

    {null}
    
  • serde: OneOrMore<IFlexibleSerde>

    You can pass one or more IFlexibleSerde that will be used to register all IGroupableCache related errors and events.

    {true}
    
  • OptionalshouldRegisterErrors?: boolean

    If set to true, all IGroupableCache related errors will be registered with the specified IFlexibleSerde during constructor initialization. This ensures that all IGroupableCache related errors will be serialized correctly.

    {true}
    
  • OptionalshouldRegisterEvents?: boolean

    If set to true, all IGroupableCache related events will be registered with the specified IFlexibleSerde during constructor initialization. This ensures that all IGroupableCache related events will be serialized correctly.

    {true}
    
  • Optionaltimeout?: TimeSpan | null

    The default timeout to use in the returned LazyPromise.

    {null}