mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
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:
@@ -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']
|
||||
|
Reference in New Issue
Block a user