Data Table Cache
AI-generatedSummary
Cache data rows in an n8n data table by looking up, validating freshness, and optionally updating JSON payloads keyed on a specified column.
Inputs
- Data Table (required) — Select the backing n8n data table either from a list or by specifying its ID.
- Key Column Name or ID (required) — Choose the column storing the cache key for lookup and update operations, either from table columns or via expression.
- Cache Key (required) — Specify the cache key value to retrieve or store in the data table.
- Payload Column Name or ID — Select the column holding the JSON-stringified cached payload.
- Last Modified Column Name or ID — Select the column storing the ISO timestamp of the last cached write.
- Last Access Column Name or ID — Optionally select a column to track last hit timestamps, required if measuring cache expiration from last access.
- Max Age — Set the maximum age of a cache hit before it is considered expired, in combination with Unit.
- Unit — Define the time unit (seconds, minutes, hours, days) for Max Age.
- Measure From — Choose whether to measure cache expiration from the last modified or last access timestamp.
Output shape
two output streams: 'Cache Hit' with fresh cached payloads deserialized to JSON, and 'Cache Miss' with input items missing or expired, optionally including stale data.
The node reads from the first input stream to perform cache lookups and routes results to 'Cache Hit' or 'Cache Miss' outputs based on freshness determined by timestamp columns and TTL settings. If configured, it writes updates from the second input stream to the cache, recording payload and timestamps. Errors per item respect continueOnFail settings, routing failures to 'Cache Miss' or throwing exceptions.