Skip to content

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

PropertyModifierTypeDescription
keyreadonlystringThe canonical cache key.
modelreadonlyLucidModelThe (related) model whose snapshot is being cached.
phasereadonlyCacheMiddlewarePhase'prepare' before writing to the cache, 'consume' after reading from it.
relationreadonlystringThe relation name the snapshot is being cached under.
valuepublicRecord<string, unknown>The snapshot under transformation; handlers mutate or replace this.