mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Update cache management in ApiRoutes to remove hash index by file path
- Added functionality to update the hash index by removing entries associated with the specified file path during cache management. - Ensured that the cache is properly resorted after the removal of raw data items.
This commit is contained in:
@@ -269,6 +269,9 @@ class ApiRoutes:
|
||||
cache = await self.scanner.get_cached_data()
|
||||
cache.raw_data = [item for item in cache.raw_data if item['file_path'] != main_path]
|
||||
await cache.resort()
|
||||
|
||||
# update hash index
|
||||
self.scanner._hash_index.remove_by_path(main_path)
|
||||
|
||||
# Delete optional files
|
||||
for pattern in patterns[1:]:
|
||||
|
||||
Reference in New Issue
Block a user