mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
fix: safely handle missing cache entries in CacheManager
This commit is contained in:
@@ -145,8 +145,10 @@ class CacheManager:
|
|||||||
return self._memory_cache[key]
|
return self._memory_cache[key]
|
||||||
else:
|
else:
|
||||||
# Clear expired memory cache
|
# Clear expired memory cache
|
||||||
del self._memory_cache[key]
|
if key in self._memory_cache:
|
||||||
del self._memory_cache_timestamps[key]
|
del self._memory_cache[key]
|
||||||
|
if key in self._memory_cache_timestamps:
|
||||||
|
del self._memory_cache_timestamps[key]
|
||||||
|
|
||||||
cache_path = self._get_cache_path(key)
|
cache_path = self._get_cache_path(key)
|
||||||
if not os.path.exists(cache_path):
|
if not os.path.exists(cache_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user