Type Alias GetOrAddSettings

GetOrAddSettings: CacheWriteSettings & { enableLocking?: boolean }

Configuration settings for cache get-or-add operations. Extends CacheWriteSettings to support atomic read-compute-write patterns.

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

Type declaration

  • OptionalenableLocking?: boolean

    Enable distributed locking for the get-or-add operation. When enabled, uses a lock to ensure only one client computes and caches the value, preventing cache stampedes when multiple clients request the same missing key.

    false