mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-07 01:32:49 -08: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:
parent
f71630edb3
commit
ccd97886da
3 changed files with 8 additions and 8 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue