Memoization

Reuse successful results when a deterministic Step receives identical inputs.

Configure Memoized Handling

{
  "id": "lookup-exchange-rate",
  "type": "service",
  "handling": "memoized",
  "http": {
    "invoke": {"endpoint": "https://api.example.com/rates"}
  },
  "attributes": {
    "from_currency": {"role": "required", "type": "string"},
    "to_currency": {"role": "required", "type": "string"},
    "rate": {"role": "output", "type": "number"}
  }
}

The cache key combines the complete Step definition with its inputs. A matching key returns the successful outputs from the earlier execution. Updating the Step definition creates a new key space automatically.

Cache Scope

PropertyBehavior
LocationMemory on each engine instance
LifetimeEngine process lifetime
EvictionLeast recently used; MEMO_CACHE_SIZE defaults to 65,536 entries
Stored resultsSuccessful executions

Use memoized handling for deterministic, read-only work such as stable lookups and expensive calculations. Use standard handling for operations whose result or external effect changes between calls, including writes, payments, timestamps, and random values.