Nodes/ComfyUI Easy Use/easy clearCacheKey
ComfyUI Node Runs on cloud

easy clearCacheKey

Force a cached branch to recompute mid-graph

By yolain·Created 3 years ago·Updated 12 days ago· 2,647
easy clearCacheKey
  • anything
  • output
cache_key*

This is a niche plumbing node, and it's fine that most people never touch it. Easy-Use caches some node outputs by a named key so it can skip recomputing an unchanged branch on the next run. easy clearCacheKey is the escape hatch: it wipes a cached entry so the thing behind it runs fresh next time. If you've never hit a stale-cache problem, you don't need this node. If you have - a value that stubbornly won't update no matter what you change upstream - this is the reset button.

How it works

The node is a passthrough with a side effect. Whatever you wire into anything comes straight back out of output, unchanged. On the way through, it invalidates the cache entry matching cache_key. So you drop it inline on a wire, point it at the key you want to bust, and the next execution re-derives that branch instead of serving the memoized result. It's marked as an output node, which means it participates in the run rather than being pruned away when nothing "downstream" consumes it - that's what lets the cache-clear reliably fire.

The inputs and outputs that matter

There are only two inputs, and both matter:

  • anything (type *) - the wire it sits on. Accepts any type; it's just passing the value along so you can insert the node without breaking your graph's flow.
  • cache_key (default *) - which cached entry to clear. The default * is a wildcard that clears everything Easy-Use has cached. Set a specific key string to surgically bust just one entry and leave the rest of your cache warm.

The single output, output (also *), is the same value you fed in. Wire it onward exactly where anything would have gone.

Installing it

It ships with the pack, so there's nothing node-specific to download. Install ComfyUI-Easy-Use via ComfyUI Manager (search ComfyUI Easy Use, install, restart) or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use

Run the requirements install and restart ComfyUI.

When you'd actually use it

Honestly, rarely - and that's the right amount. The realistic case is a loop or a workflow where an Easy-Use node is caching a result you want recomputed each pass, and toggling the usual controls isn't clearing it. Drop easy clearCacheKey on the branch, give it the key (or leave it on * if you don't know the key and just want a hard reset), and you've forced the refresh. Because the default clears the entire cache, be aware that leaving it at * throws away every warm branch, not just the one you cared about - if your graph has an expensive step that was correctly cached, you'll pay to recompute that too. Name the specific key when you can. Beyond that troubleshooting role, there's not much to say: it's a small, honest utility, not something to build a workflow around.

CategoryEasyUse/Logic

Inputs (2)

NameTypeDefaultDescription
anything*
cache_keySTRING*

Outputs (1)

NameTypeDescription
output*