Type Alias CacheSettingsBase

CacheSettingsBase: { context?: IReadableContext; defaultTtl?: ITimeSpan | null }

Base configuration shared by all Cache variants. Provides optional schema validation for all cached values.

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

Type declaration

  • Optionalcontext?: IReadableContext

    You can pass IReadableContext that will be used by context-aware adapters.

    import { ExecutionContext } from "@daiso-tech/core/execution-context"
    import { NoOpExecutionContextAdapter } from "@daiso-tech/core/execution-context/no-op-execution-context-adapter"

    new ExecutionContext(new NoOpExecutionContextAdapter())
  • OptionaldefaultTtl?: ITimeSpan | null

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

    null