Type Alias CacheWriteSettings

CacheWriteSettings: { jitter?: number; ttl?: ITimeSpan | null }

Configuration settings for cache write operations.

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

Type declaration

  • Optionaljitter?: number

    Random jitter factor (0-1) to add variance to expiration times. Prevents thundering herd problems when many entries expire simultaneously. A value of 0.1 adds ±10% randomness to the TTL.

  • Optionalttl?: ITimeSpan | null

    Time-to-live (TTL) duration for cached entries. When set, entries will automatically expire after this duration. Pass null to cache entries without automatic expiration.