Fix datetime serialization in cache manager. Add custom JSON encoder to handle datetime objects.

This commit is contained in:
ChuckBuilds
2025-04-19 16:58:45 -05:00
parent 8ee3b1001a
commit 2391fdaee0

View File

@@ -107,7 +107,7 @@ class CacheManager:
# Then save to disk
with open(cache_path, 'w') as f:
json.dump(data, f)
json.dump(data, f, cls=DateTimeEncoder)
except Exception as e:
self.logger.error(f"Error saving cache for {key}: {e}")