fix: remove unused imports (ruff) and update tests for internal API

- Remove unused CacheContext and _serialize_cache_key imports from
  caching.py (now handled by _build_context helper)
- Update test_cache_provider.py to use _-prefixed internal names
- Update tests for new CacheContext.cache_key_hash field (str)
- Make MockCacheProvider methods async to match ABC

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deep Mehta
2026-03-03 12:51:23 -08:00
parent 4cbe4fe4c7
commit da514866d6
2 changed files with 63 additions and 67 deletions

View File

@@ -230,8 +230,7 @@ class BasicCache:
"""Notify external providers of cache store (fire-and-forget)."""
from comfy_execution.cache_provider import (
_has_cache_providers, _get_cache_providers,
CacheContext, CacheValue,
_serialize_cache_key, _contains_nan, _logger
CacheValue, _contains_nan, _logger
)
# Fast exit conditions
@@ -269,8 +268,7 @@ class BasicCache:
"""Check external providers for cached result."""
from comfy_execution.cache_provider import (
_has_cache_providers, _get_cache_providers,
CacheContext, CacheValue,
_contains_nan, _logger
CacheValue, _contains_nan, _logger
)
if self._is_subcache: