Optionaloptions: PersistCacheOptionsBack-compat: the cached table for a plan, ignoring engine semantics.
Mark a plan: its next execution stores the result (if the plan is cacheable).
Optionaloptions: PersistOptionsCalled by the runtime before executing: a hit (the table plus its provenance, already checked against a strict request), a miss, a reason the marked plan cannot be cached, or "not marked".
Optionalrequest: { requested: EngineKind; strict: boolean }
An LRU of materialized plan results keyed by the optimized plan's structural hash. One instance is the process default (what
persist()on the default runtime uses);new Runtime({ persist: new PersistCache() })gives a tenant / request / test its own — nothing it caches is visible to any other runtime, andclear()drops exactly its entries.Semantics (docs/operations.md → persist): a plan is cached only when every input is immutable — frames built with
fromColumns(…, { copy: false })alias caller memory and are refused — and it calls no UDF unlesspersist({ trustUdfs: true }). Every entry records which engines produced it; a strict engine request is served from the cache only when that engine produced the entry, otherwise the plan runs (and either the engine executes it orEngineStrictErroris raised, exactly as without a cache).