Skip to content

CacheSetOptions

Defined in: packages/ddd-core/application/ports/cache.port.ts:4

Options applied to one cache write.

optional isNewer?: (cached, incoming) => boolean

Defined in: packages/ddd-core/application/ports/cache.port.ts:15

Atomic stale-write guard. When the adapter can compare an existing value with the incoming value, returning true means the cached value is newer and must not be overwritten.

isCacheNewer is the standard comparator for versioned snapshots.

unknown

unknown

boolean


optional ttl?: number

Defined in: packages/ddd-core/application/ports/cache.port.ts:6

Entry lifetime in milliseconds. Adapter-specific semantics apply when omitted.