Interface: CacheMiddlewareContext
Mutable context threaded through a model's cache-middleware pipeline. Handlers read the metadata and transform value in place (or reassign it).
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
key | readonly | string | The canonical cache key. |
model | readonly | LucidModel | The (related) model whose snapshot is being cached. |
phase | readonly | CacheMiddlewarePhase | 'prepare' before writing to the cache, 'consume' after reading from it. |
relation | readonly | string | The relation name the snapshot is being cached under. |
value | public | Record<string, unknown> | The snapshot under transformation; handlers mutate or replace this. |