ComfyUI/comfy_execution
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
..
cache_provider.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
graph_utils.py V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
graph.py Revert "Revert "feat: Add CacheProvider API for external distributed caching"" (#12915) 2026-03-12 21:17:50 -07:00
jobs.py Revert "Include workflow_id in all execution WebSocket messages (CORE-198) (#…" (#13901) 2026-05-14 15:35:42 -07:00
progress.py Revert "Include workflow_id in all execution WebSocket messages (CORE-198) (#…" (#13901) 2026-05-14 15:35:42 -07:00
utils.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00
validation.py V3 Improvements + DynamicCombo + Autogrow exposed in public API (#11345) 2025-12-30 23:09:55 -05:00