fix: safely handle missing cache entries in CacheManager

This commit is contained in:
ChuckBuilds
2025-04-19 21:55:17 -05:00
parent a91d7f3da6
commit 2c11fac201

View File

@@ -145,7 +145,9 @@ class CacheManager:
return self._memory_cache[key] return self._memory_cache[key]
else: else:
# Clear expired memory cache # Clear expired memory cache
if key in self._memory_cache:
del self._memory_cache[key] del self._memory_cache[key]
if key in self._memory_cache_timestamps:
del self._memory_cache_timestamps[key] del self._memory_cache_timestamps[key]
cache_path = self._get_cache_path(key) cache_path = self._get_cache_path(key)