Files
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
..
2026-04-23 20:51:34 -07:00
2025-07-29 22:17:22 -04:00
2025-07-29 22:17:22 -04:00
2025-07-29 22:17:22 -04:00
2025-07-29 22:17:22 -04:00