ComfyUI/comfy_api/latest
Deep Mehta fcbe7db46f feat(cache-provider): add on_set_prompt lifecycle hook for providers
Adds a new on_set_prompt() lifecycle hook on CacheProvider that fires
after the cache key set is prepared for a new prompt. Dispatched via
asyncio.create_task with errors swallowed (same fail-safe pattern as
on_store / on_lookup).

Why: BasicCache's lifecycle notifications to external providers were
incomplete. set_prompt is a key per-prompt event that providers need
visibility into — for example, to reset per-prompt timing/state used
for cost-aware caching policies (a provider can set t=0 here, then
measure elapsed at each on_store to estimate compute saved by a hit).

Backward-compatible: default implementation is a no-op, existing
providers compile and run unchanged. Providers that need the per-prompt
boundary override on_set_prompt().
2026-05-20 21:15:35 -07:00
..
_input range type (#13322) 2026-04-23 20:51:34 -07:00
_input_impl Load other jpeg formats without taking so much memory. (#13642) 2026-04-30 19:33:09 -04:00
_util feat: Extend Save3D to save vertex colors and textures (CORE-189) (#13824) 2026-05-13 18:33:53 +03:00
generated ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
__init__.py Revert "Revert "feat: Add CacheProvider API for external distributed caching"" (#12915) 2026-03-12 21:17:50 -07:00
_caching.py feat(cache-provider): add on_set_prompt lifecycle hook for providers 2026-05-20 21:15:35 -07:00
_io_public.py Add MatchType, DynamicCombo, and Autogrow support to V3 Schema (#10832) 2025-12-03 00:17:13 -05:00
_io.py Add support for BiRefNet background remove model (CORE-46) (#12747) 2026-05-08 17:59:24 +08:00
_ui_public.py Add MatchType, DynamicCombo, and Autogrow support to V3 Schema (#10832) 2025-12-03 00:17:13 -05:00
_ui.py comfy_api: remove usage of "Type","List" and "Dict" types (#11238) 2025-12-15 16:01:10 -08:00