Cache Backend Data List (Inspire)
Stash a whole list in memory under one key
- data
- data opt
This is the list-aware member of Inspire's backend cache family. It parks data in ComfyUI's memory under a string key so you - or a completely separate workflow - can pull it back later, and the "List" part is the whole point: it caches an entire list as one entry under one key, and hands it back as a list when you retrieve it. The plain Cache Backend Data node doesn't do that, and that difference matters more than it looks.
Why a dedicated list version exists: when ComfyUI runs a list, it runs the node once per item. If you feed a list into the ordinary Cache Backend Data, it fires repeatedly and each run overwrites the same key with the latest item - so you end up caching only the last element, or clobbering good data. This node is built to receive the list, combine it, and store it whole. Use it whenever the thing you want to cache is a list rather than a single object.
How it works
Inspire's backend cache is a simple key→value store kept alive in the backend process, outside the graph, which is why it survives across queue runs and workflow switches (and dies on a ComfyUI restart, because it's memory, not disk). This node writes a list into that store under your key, tagged with tag. To read it back, use the matching retrieve node with the same key - the output comes back in list form.
The value type is a wildcard, so the list can hold anything: images, latents, strings, whatever. It's also an output node, so it can sit at the end of a branch purely to perform the caching.
The inputs and outputs that matter
key(STRING) - the name you store under and retrieve by. Reuse it in a retrieve node to get the list back; reuse it in another cache node to overwrite.tag(STRING) - a grouping label. Not cosmetic: each tag has a max entry count (default is small, around 5), and exceeding it evicts the oldest entries under that tag.data(type*) - the list you're caching. Anything goes.
The output is data opt (type *, a list) - a pass-through of the cached list, so you can splice this node inline in a chain instead of dead-ending it.
How to install it
ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
then restart. It's from Dr.Lt.Data - fittingly, the same person behind ComfyUI-Manager, so cache plumbing is on brand.
Common issues & troubleshooting
Only the last item got cached. You used the plain Cache Backend Data on a list input. That's exactly the trap this node exists to avoid - swap it for this List version, which stores the combined list under one key. (If you genuinely want per-item caching, give each element a unique key instead.)
Retrieve returns a single value, not a list. Make sure you're retrieving with a List-aware retrieve node and the same key. The list shape is preserved on the way out only through the list path.
It's gone after a restart. Expected - this is an in-memory cache, not persistent storage. If you need it to survive a restart, write to disk.
The entry vanished on its own. Tag size limit. Caching more items under the same tag than its cap (default ~5) evicts the oldest. Give important data its own tag, or bump the tag's size via the Show Cached Info node.
Execution order looks wrong. ComfyUI doesn't guarantee ordering between unconnected branches. If something needs to read the cache after it's written, chain them through the data opt pass-through so there's a real dependency rather than two parallel islands.
Memory climbs. You're caching big lists and never clearing them. Free a key with Remove Backend Data when you're done (and * as the key clears everything).
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | — | |
| tag | STRING | — | |
| data | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| data opt | * | — |