Skip to main content

Interface: CacheInvalidatedEventData

Defined in: shared/types/events.ts:315

Payload for cache invalidation events.

Remarksโ€‹

Used to notify listeners that a cache entry or the entire cache has been invalidated for a specific reason.

Exampleโ€‹

const event: CacheInvalidatedEventData = {
type: "all",
reason: "manual",
timestamp: Date.now(),
};

Extendsโ€‹

Propertiesโ€‹

timestampโ€‹

readonly timestamp: number

Defined in: shared/types/events.ts:74

The time (in milliseconds since epoch) when the event occurred.

Inherited fromโ€‹

BaseEventData.timestamp


_meta?โ€‹

readonly optional _meta: EventMetadata

Defined in: shared/types/events.ts:76

Runtime metadata describing the emission context.

Inherited fromโ€‹

BaseEventData._meta


_originalMeta?โ€‹

readonly optional _originalMeta: EventMetadata

Defined in: shared/types/events.ts:78

Preserves previously attached metadata when re-emitting events.

Inherited fromโ€‹

BaseEventData._originalMeta


identifier?โ€‹

readonly optional identifier: string

Defined in: shared/types/events.ts:322

The specific identifier affected (optional for global invalidation).

Remarksโ€‹

If omitted, the invalidation is considered global.


reasonโ€‹

readonly reason: CacheInvalidationReason

Defined in: shared/types/events.ts:329

The reason for invalidation.

Remarksโ€‹

See CACHE_INVALIDATION_REASON for the complete list.


typeโ€‹

readonly type: CacheInvalidationType

Defined in: shared/types/events.ts:336

The type of cache invalidation.

Remarksโ€‹

See CACHE_INVALIDATION_TYPE for the complete list.