fix bogus metadata for extra networks appearing out of cache

fix description editing for checkpoint not immediately appearing on cards
This commit is contained in:
AUTOMATIC1111
2023-07-16 09:49:22 +03:00
parent f71630edb3
commit ccd97886da
3 changed files with 8 additions and 8 deletions

View File

@@ -80,18 +80,18 @@ def cached_data_for_file(subsection, title, filename, func):
entry = existing_cache.get(title)
if entry:
cached_mtime = existing_cache[title].get("mtime", 0)
cached_mtime = entry.get("mtime", 0)
if ondisk_mtime > cached_mtime:
entry = None
if not entry:
entry = func()
if entry is None:
value = func()
if value is None:
return None
entry['mtime'] = ondisk_mtime
entry = {'mtime': ondisk_mtime, 'value': value}
existing_cache[title] = entry
dump_cache()
return entry
return entry['value']