columna API reference - v0.4.1
    Preparing search index...

    Class PersistCache

    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, and clear() 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 unless persist({ 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 or EngineStrictError is raised, exactly as without a cache).

    Index
    • Returns void

    • Parameters

      Returns boolean

    • Back-compat: the cached table for a plan, ignoring engine semantics.

      Parameters

      Returns PersistLookup

    • Mark a plan: its next execution stores the result (if the plan is cacheable).

      Parameters

      • plan: PlanNode
      • Optionaloptions: PersistOptions

      Returns void

    • Store after execution when the plan was marked (or is already cached) and is cacheable.

      Parameters

      Returns void

    • Called 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".

      Parameters

      Returns PersistProbe

    • Returns PersistCacheStats

    • Store unconditionally (marks the plan). Refuses plans over caller-owned buffers.

      Parameters

      • plan: PlanNode
      • table: TableView
      • Optional_pinned: boolean
      • Optionalprovenance: PersistProvenance

      Returns void

    • Parameters

      Returns void