Nodes/Booru Prompter/Export Cache
ComfyUI Node

Export Cache

Dump every tag lookup you've cached into one JSON blob

By dumbdemon·Created 7 days ago·Updated 2 days ago· 0
Export Cache
    • cache_json

    Every post the Booru-Prompter pack fetches - through either the ID or URL "Get Tags" node - gets parked in a local disk cache so you don't hammer the booru's API every time you reuse a prompt. DDExportCache is the tiny utility that shows you what's in there: no inputs, one STRING output, and it serializes the whole cache into pretty-printed JSON for you.

    If that sounds niche, it is. You'll want this node in exactly a few situations: you're about to purge the cache and want a backup, you're curious which post IDs you've already looked up, or you're building an offline workflow where you read tag data from a saved file instead of the network. It's also just the easiest way to see the cache working - run a few Get Tags lookups, fire DDExportCache into a Show Text or Save Text node, and you get the receipts.

    What the JSON looks like

    The output is one object keyed by post ID, one entry per cached post. Each entry carries the six tag lanes from the booru fetch as arrays - all_tags, tags, artist_tags, character_tags, copyright_tags, meta_tags - plus a tag_counts object so you can see how many tags landed in each lane at a glance. Wire cache_json into a Show Text node to eyeball it, or a Save Text node to write it to disk before you wipe the cache.

    A couple of honest caveats. If you've never run a Get Tags node, the cache is empty and this node returns an empty object - export only shows what the pack has already fetched. And the cache itself lives in a sqlite-backed directory inside your ComfyUI user folder (user/default/BooruPrompter/.bp_cache), so this node is a friendlier front door than poking around in there yourself.

    Cache behavior worth knowing

    Entries don't live forever. By default each lookup is cached for 7 days, and the timer resets every time you use that post again (settings: cache_rolling_rate, cache_refresh_on_use). Options under ComfyUI Settings → Booru Prompter let you purge the cache on startup or rewrite the timers. If a post 404s or your user ID isn't configured, the error text gets cached too - so a "wrong-looking" export is usually a clue that a lookup failed rather than a bug in the exporter.

    Installing it

    It ships with the pack, so install Booru Prompter via ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dumbdemon/Booru-Prompter
    

    Restart, and all three nodes appear. No model downloads, no extra services - the only real dependency beyond what ComfyUI already has is diskcache (pip install diskcache in your ComfyUI env if the pack won't load). This is a debugging/utility node, not a workflow centerpiece, but when you need to know what your tag cache actually holds, it's exactly the right tool.

    CategoryBooru Prompter

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    cache_jsonSTRING