Shrug Cache Control
Peek inside (or flush) your server's KV cache
- connection
- info
Your LLM server keeps a KV cache - the internal state that lets it avoid recomputing already-seen tokens. It's why repeated prompts feel fast and why a long chat session doesn't re-process its whole history every turn. Most of the time you never need to think about it. But when a session has been running for hours, the cache is the thing quietly holding gigabytes of memory, and occasionally it's the reason generations start drifting or repeating in ways that make no sense. Shrug Cache Control is the pack's window into that cache: list what's in it, or clear it.
This is a niche node and it knows it. You won't use it every session. But when you're debugging a long-running workflow or about to benchmark something and want a clean slate, having the flush button inside the graph (instead of a curl call) is genuinely handy.
How it works
Two modes, from the action combo:
list(default) - calls the server's/v1/cache/listendpoint and returns the cache info as a JSON string in theinfooutput. Handy for seeing how many cached entries there are and roughly what's occupying memory.clear- calls/v1/cache/clearand returns the string"cache cleared".
The asymmetry that matters: listing is public, clearing is admin-gated. The clear call sends the admin_token from your ShrugConnection as an X-Heylook-Admin-Token header, and it has to match the server's HEYLOOK_ADMIN_TOKEN environment variable. Set that up once on the server side, put the same value in the admin_token field of the connection, and clearing works. Miss it and you'll get an auth error on clear while list works fine.
That split is deliberate in the client code - inference endpoints never require auth, admin endpoints do - so don't assume a server that lets you chat freely will let you clear its cache.
Inputs and outputs
connection(required) - aSHRUG_CONNfromShrugConnection. Theadmin_tokenon that connection is what unlocksclear.action(required) -listorclear, defaultlist.
One output: info - a STRING. It's JSON for list, and a plain "cache cleared" for clear.
How to install
Standard pack install. ComfyUI Manager → search Shrug-Prompter → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/fblissjr/shrug-prompter
Dependencies are already present in any modern ComfyUI (httpx, orjson, pillow, torch, numpy) - nothing heavy, no model downloads (the cache being cleared lives on the server). A current ComfyUI build is required (V3 extension API).
Common issues
listworks,clearerrors. The admin token mismatch described above. Check that the connection'sadmin_tokenmatches the server'sHEYLOOK_ADMIN_TOKEN.infois an empty JSON object. A freshly started server has an empty cache. Not a bug.- You cleared the cache and generations feel slower. Correct and expected - the server is recomputing context it used to have cached. It'll warm back up.
- Node won't run at all. Server down or wrong
base_urlon the connection. Same checklist as every other server-facing node in the pack.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| connection | SHRUG_CONN | — | |
| action | COMBO | list | 2 options: list, clear |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| info | STRING | — |