Skip to main content

Cache node

Cache

The Cache node reads and writes an account-scoped, cross-run cache. Use it to memoize expensive per-key lookups (e.g. a Salesforce account id → account owner name mapping) so subsequent runs skip the lookup.

When to use

  • The same lookup is repeated across many runs and hitting the source is expensive.
  • The value is idempotent — the same key always produces the same value (or the same value for a bounded TTL).
  • You want a run-level replay hint: a cache miss on this row means the lookup was fresh; a cache hit means it came from the pre-warmed state.

Ports

PortDirectionKindNotes
inindataRows to key against the cache.
hitoutdataRows whose key was in the cache; enriched with the cached value.
missoutdataRows whose key was NOT in the cache. Downstream must produce the value and write it back.
erroroutcontrolFires on cache backend errors.
notifyoutcontrolNotification policy port.

Configuration

  • Cache namespace. Logical bucket for the cache. Namespaces are per-account, isolated across projects.
  • Cache key. Expression that produces the string key for each row. CACHE_KEY(...) composes multi-part keys with the SOH separator.
  • Value column. The row column that carries the value on cache read (target of the enrichment on hit) and on cache write (source of the value written back).
  • TTL (optional). Per-entry lifetime in seconds. Missing → live forever until explicitly invalidated.
  • Write policy.
    • on_miss (default) — write the value back when the row lands on miss and the downstream chain populates the value column.
    • always — write on every row (useful for refreshing the TTL clock).

Runtime behaviour

  • Reads and writes go through the runtime's cache adapter. Keys are namespaced by account_id + namespace.
  • Rows lands on hit if the key is present; the value is spread into the row under valueColumn.
  • Rows land on miss when the key is absent. Chain a downstream Lookup or DbScript to produce the value; chain back through a second Cache node (write mode) to persist it.

Failure modes

  • Cache backend down. The error port fires; the run stops or continues depending on your on_error policy.