Type Alias CacheSettingsBase

CacheSettingsBase: {
    defaultTtl?: TimeSpan | null;
    eventBus?: IEventBus;
    lazyPromiseFactory?: Factory<AsyncLazy<any>, LazyPromise<any>>;
    namespace: Namespace;
}

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

Type declaration

  • OptionaldefaultTtl?: TimeSpan | null

    You can decide the default ttl value. If null is passed then no ttl will be used by default.

    {null}
    
  • OptionaleventBus?: IEventBus
    import { EventBus } from "@daiso-tech/core/event-bus";
    import { MemoryEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
    import { Namespace } from "@daiso-tech/core/utilities";

    new EventBus({
    namespace: new Namespace("event-bus"),
    adapter: new MemoryEventBusAdapter()
    })
  • OptionallazyPromiseFactory?: 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.

    import { LazyPromise } from "@daiso-tech/core/async";

    (invokable) => new LazyPromise(invokable)
  • namespace: Namespace