Relax cache validation by removing strict modification time checks, allowing users to refresh the cache as needed.

This commit is contained in:
Will Miao
2025-05-29 20:58:06 +08:00
parent f7be5c8d25
commit 67acd9fd2c

View File

@@ -147,11 +147,9 @@ class ModelScanner:
if set(stored_dirs.keys()) != set(current_dirs.keys()): if set(stored_dirs.keys()) != set(current_dirs.keys()):
return False return False
# Check if any directory's modification time has changed # Remove the modification time check to make cache validation less strict
for dir_path, stored_time in stored_dirs.items(): # This allows the cache to be valid even when files have changed
current_time = current_dirs.get(dir_path) # Users can explicitly refresh the cache when needed
if current_time is None or current_time > stored_time:
return False
return True return True