ComfyUI/comfy_api
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 ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
internal comfy_api: remove usage of "Type","List" and "Dict" types (#11238) 2025-12-15 16:01:10 -08:00
latest feat(cache-provider): add on_set_prompt lifecycle hook for providers 2026-05-20 21:15:35 -07:00
torch_helpers Make torch.compile LoRA/key-compatible (#8213) 2025-05-21 04:56:56 -04:00
util ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
v0_0_1 ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
v0_0_2 Add MatchType, DynamicCombo, and Autogrow support to V3 Schema (#10832) 2025-12-03 00:17:13 -05:00
feature_flags.py feat: add generic --feature-flag CLI arg and --list-feature-flags registry (#13685) 2026-05-04 19:50:26 -07:00
generate_api_stubs.py ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
util.py ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
version_list.py comfy_api: remove usage of "Type","List" and "Dict" types (#11238) 2025-12-15 16:01:10 -08:00