ComfyUI/comfy_execution
Deep Mehta 6540aa0400 feat: Add CacheProvider API for external distributed caching
Introduces a public API for external cache providers, enabling distributed
caching across multiple ComfyUI instances (e.g., Kubernetes pods).

New files:
- comfy_execution/cache_provider.py: CacheProvider ABC, CacheContext/CacheValue
  dataclasses, thread-safe provider registry, serialization utilities

Modified files:
- comfy_execution/caching.py: Add provider hooks to BasicCache (_notify_providers_store,
  _check_providers_lookup), subcache exclusion, prompt ID propagation
- execution.py: Add prompt lifecycle hooks (on_prompt_start/on_prompt_end) to
  PromptExecutor, set _current_prompt_id on caches

Key features:
- Local-first caching (check local before external for performance)
- NaN detection to prevent incorrect external cache hits
- Subcache exclusion (ephemeral subgraph results not cached externally)
- Thread-safe provider snapshot caching
- Graceful error handling (provider errors logged, never break execution)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-19 16:43:13 +05:30
..
cache_provider.py feat: Add CacheProvider API for external distributed caching 2026-01-19 16:43:13 +05:30
caching.py feat: Add CacheProvider API for external distributed caching 2026-01-19 16:43:13 +05:30
graph_utils.py V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
graph.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00
jobs.py feat: add cancelled filter to /jobs (#11680) 2026-01-08 21:57:36 -08:00
progress.py Fix progress update crossover between users (#9706) 2025-09-04 19:13:28 -04: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