mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-18 06:03:16 +01:00
Browser Cache Chome Simple Cache -- Skip with warning on bad file parse instead of error.
This commit is contained in:
parent
bccb7eed85
commit
cce2f18d0c
1 changed files with 8 additions and 4 deletions
|
|
@ -83,10 +83,14 @@ class SimpleCache(BaseBrowserCache):
|
|||
# logger.debug("%s: %s > %s"%(os.path.basename(path),stats.st_mtime,file_comp_time))
|
||||
if( re.match(r'^[0-9a-fA-F]{16}_[0-9]+$',os.path.basename(path))
|
||||
and stats.st_mtime > file_comp_time ):
|
||||
(cache_url,created) = _get_entry_file_created(path)
|
||||
if cache_url:
|
||||
self.add_key_mapping(cache_url,path,created)
|
||||
self.count+=1
|
||||
try:
|
||||
(cache_url,created) = _get_entry_file_created(path)
|
||||
if cache_url:
|
||||
self.add_key_mapping(cache_url,path,created)
|
||||
self.count+=1
|
||||
except Exception as e:
|
||||
logger.warn("Cache file %s failed to load, skipping."%path)
|
||||
logger.debug(traceback.format_exc())
|
||||
|
||||
# key == filename for simple cache
|
||||
def get_data_key(self, key):
|
||||
|
|
|
|||
Loading…
Reference in a new issue