Package Information
Documentation
n8n-nodes-datatable-cache
A Data Table Cache node for n8n: a read-through / write-back cache backed by an n8n
data table, with hit/miss routing and TTL expiry.
š¦ npm: n8n-nodes-datatable-cache
Requirements: an n8n version whose public API serves
/api/v1/data-tables(older
instances return 404), andexecutionOrder: v1(the default on recent n8n).
What it does
Two inputs (Input, Update), two outputs (Cache Hit, Cache Miss), wired as a loop:
Input āā¶ āā Data Table Cache āā āā¶ Cache Hit ā use payload
Update āā¶ āāāāāāāāāāāāāāāāāāāāāā āā¶ Cache Miss ā work āā
ā²āāāāāāāāāāāāāāāā Update āāāāāāāāāāāāāāāā
- Input ā look up by key. A fresh hit emits the cached payload on Cache Hit; a miss or
expired hit emits the item on Cache Miss (with the stale row under_staleRow). - Update ā write processed items back; each is upserted and re-emitted on Cache Hit.
Wire it as a loop: Cache Miss ā your work ā the Update input; take Cache Hit onward.
ā”ļø Setup ā one-time install: community node, data table, API key, credential
(with screenshots).
ā”ļø Usage guide ā per-workflow: importable example, node config, the cache
loop, TTL, and evicting expired rows.
Install
Community node (n8n Settings ā Community Nodes ā Install):n8n-nodes-datatable-cache.
Setup (quick)
- Data table with columns
cache_key,payload,last_modified(and optionallast_access) ā see Setup. - Credential: the built-in n8n API credential ā an API key (with
dataTable*scopes)
and a Base URL ending in/api/v1.
Parameters
| Parameter | Default | Notes |
|---|---|---|
| Data Table | ā | Pick from list or enter the table ID |
| Key Column | cache_key |
Column matched against the cache key |
| Cache Key | ā | Value to look up (Input) or store under (Update) |
| Payload Column | payload |
Holds the JSON-stringified payload |
| Last Modified Column | last_modified |
ISO timestamp of the last write |
| Last Access Column | last_access |
ISO timestamp of the last hit (optional; leave empty to skip) |
| Max Age + Unit | 3600 s |
A hit older than this becomes a miss |
| Measure From | Last Modified |
Whether TTL counts from last_modified or last_access |
Limitations
- Expiry: TTL only (filter-condition mode planned).
- Concurrency: last-write-wins ā fine for a cache, not for transactional data.
- Malformed payload: degrades to
{ _raw: <value> }rather than throwing. - Continue On Fail: errored items are emitted with an
errorfield (lookup ā Cache Miss,
store ā Cache Hit) instead of failing the run.
Development
npm install
npm run build # tsc + copy assets to dist/
npm run lint
All data-table I/O is isolated in nodes/DataTableCache/stores/ behind the CacheStore
interface; client.ts (dataTableRequest) is the single line to revisit on n8n API changes.