Skip to content

CacheStateEntry

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

Observed state of a cache key including opaque revision fencing.

T = unknown

Value shape stored by this cache adapter.

readonly revision: string

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

Opaque revision token associated with the key at the moment of inspection. Advances on every write or invalidation, and is preserved on payload expiry to eliminate ABA races during fill attempts.


readonly status: CacheStateStatus

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

Status of the cache entry:

  • 'hit': Value is present and unexpired.
  • 'miss': Key is absent or was invalidated.
  • 'expired': Entry existed but its TTL has elapsed.

readonly optional value?: T

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

The cached value when status is 'hit', otherwise undefined.