refactor: Update cache TTL in ModelInfoManager even on download failure

This commit is contained in:
Paul Gauthier (aider) 2024-11-20 07:56:28 -08:00
parent e917424f5d
commit 788956e86d

View file

@ -754,6 +754,12 @@ class ModelInfoManager:
pass
except Exception as ex:
print(str(ex))
finally:
# Touch the cache file to update its mtime even if download failed
try:
self.cache_file.touch()
except OSError:
pass
def get_model_from_cached_json_db(self, model):
if not self.content: