Unify Automations
Logo
Cache Management

Cache Management

Logo

4 mins READ

Cache Management in Unify Automations stores the output of a node or an API response so that subsequent runs can retrieve the cached result instead of re-executing the operation — reducing latency and the number of external API calls.

Overview

Cache-1-final 1.png
Cache-1-final 1.png

Caching is available in two contexts: in the Automation Builder, where individual nodes cache their output between runs, and in the API Manager, where a Cache Policy caches responses from an API endpoint. Both contexts share the same core concepts — a cache key, a time-to-live (TTL), and a policy for when to use the cached value — but are configured in different places.

Cache management in Automation Builder

To cache a step's output, select the step, expand the Caching / Retry / Error Handling strip at the bottom of its Input tab, and turn on Cache Management. Then configure the fields below.

Field

Description

Cache Management

Turns caching on for this step. The other fields appear once it is on.

Cache Level

Redis (default) is shared across pods and persists across restarts. Pod Level is an in-memory per-pod cache, faster but cleared on restart.

Time-to-live period (in seconds)

How long the cached value is stored, in seconds, before it is refreshed or deleted.

Fields to cache on

The input field values that identify a unique cache entry (e.g., user_id, order_id). Two runs with different values for these fields produce separate cache entries

Cache usage policy

When to use the cached value: Always (use cache whenever available) or On Error (use cache as a fallback when the node errors)

Only cache when

A condition that must be true for the result to be cached at all (e.g., only cache when status equals "success")

Evict Cache

Clears the cache entry for a specific key without clearing everything

Clear all cache

Clears all cache entries for this node

The cache key is scoped to the specific workflow and node plus your key string. If the key resolves to a missing or blank value, caching is silently skipped for that run. A fast in-memory cache layer also applies, with a freshness window of about one minute — separate from the longer-lived shared cache — so a value with a longer TTL may still refresh sooner than expected if it is served from this layer.

Cache-2-final 1.png
Cache-2-final 1.png

Cache management in API Manager

API Manager cache is configured via the Cache Policy. Enable Cache Response and set a time-to-live; key differences from node-level caching:

  • The policy applies to an entire API Group or specific endpoints, not a single node.

  • Cache keys are configured from path parameters, query parameters, and headers. If a listed key is missing, the request is not cached.

  • One policy is reusable across multiple APIs.

  • The Time-to-live period defaults to 600 seconds and can be set in seconds, minutes, hours or days.

Only successful 200 responses are cached. Cached responses are served before the backing resource runs, and include an X-Cache: HIT response header.

Clearing cache

To clear cached data:

  • Per entry: Use the "Evict Cache" field in the node's cache settings, providing the key values that identify the entry to remove.

  • All entries: Use "Clear all cache" to wipe all cached results for the node in one action.

Best practices

  • Set the TTL based on how often the underlying data changes — data that updates every 5 minutes should have a TTL of 300 seconds or less; relatively static data (reference lists, configuration) can use a longer TTL.

  • Use specific, narrow cache keys (user_id, order_id) rather than broad ones — broad keys cause cache collisions where different inputs incorrectly share a cached result.

  • Check a few runs to confirm that the step shows as cached when you expect it to.

  • Use "On Error" cache policy for critical nodes where stale data is acceptable in a failure scenario but no data at all would break the automation.

Notes

Caching reduces the number of external API calls your automations make and speeds up repeated runs for the same inputs. To make the most of it:

  • Start with a conservative TTL and extend it if runs rarely show the step as cached — a TTL that is too short negates the benefit; one that is too long serves stale data.

  • Use "Fields to Cache On" to scope the cache to the right granularity — missing a key dimension causes cache collisions.

  • Clear caches explicitly after a data import or bulk update, rather than waiting for TTLs to expire.

  • Prefer API Manager Cache Policy for caching inbound API responses; prefer node-level caching for expensive internal computations or upstream API calls inside an automation.

Properly configured caching can cut the run time and API call count of a high-volume automation by an order of magnitude.