Function: reportRelationCacheEvent()
ts
function reportRelationCacheEvent(
model: LucidModel,
event: RelationCacheEvent,
context: RelationCacheEventContext,
): void;Dispatches a relation-cache event to the effective handler — the model's own $resourcefulOnRelationsCacheEvent → the process-wide default → no-op.
Invoked SYNCHRONOUSLY inside a guard (a throwing handler is swallowed) and never awaited, so a host observer can neither break nor delay a cache op. When no handler resolves, this returns immediately (no logger, no allocation).
Parameters
| Parameter | Type | Description |
|---|---|---|
model | LucidModel | The model whose handler should be consulted. |
event | RelationCacheEvent | The lifecycle event that occurred. |
context | RelationCacheEventContext | Structured context for the event. |
Returns
void