Fix cache file creation and validation issues - ensure cache file is properly created and handled
This commit is contained in:
parent
b8228d8e07
commit
218cad82cc
@ -32,11 +32,13 @@ class CacheManager:
|
|||||||
"created": datetime.now().isoformat(),
|
"created": datetime.now().isoformat(),
|
||||||
"processed_files": {}
|
"processed_files": {}
|
||||||
}
|
}
|
||||||
|
# Set the cache attribute directly
|
||||||
self.cache = cache_data
|
self.cache = cache_data
|
||||||
self._save_cache()
|
self._save_cache()
|
||||||
return cache_data
|
return cache_data
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error loading cache file {self.cache_file}: {e}")
|
logger.error(f"Error loading cache file {self.cache_file}: {e}")
|
||||||
|
logger.info("Creating new empty cache due to load error")
|
||||||
# Return empty cache on error
|
# Return empty cache on error
|
||||||
return {
|
return {
|
||||||
"cache_version": "1.0",
|
"cache_version": "1.0",
|
||||||
|
|||||||
5
ai_processor/processed_articles_cache.json
Normal file
5
ai_processor/processed_articles_cache.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"cache_version": "1.0",
|
||||||
|
"created": "2026-02-02T10:02:48.000Z",
|
||||||
|
"processed_files": {}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user