From 67acd9fd2c9d97aa1e06800f591227c897b58080 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Thu, 29 May 2025 20:58:06 +0800 Subject: [PATCH] Relax cache validation by removing strict modification time checks, allowing users to refresh the cache as needed. --- py/services/model_scanner.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/py/services/model_scanner.py b/py/services/model_scanner.py index 8e285cdd..b110b000 100644 --- a/py/services/model_scanner.py +++ b/py/services/model_scanner.py @@ -147,11 +147,9 @@ class ModelScanner: if set(stored_dirs.keys()) != set(current_dirs.keys()): return False - # Check if any directory's modification time has changed - for dir_path, stored_time in stored_dirs.items(): - current_time = current_dirs.get(dir_path) - if current_time is None or current_time > stored_time: - return False + # Remove the modification time check to make cache validation less strict + # This allows the cache to be valid even when files have changed + # Users can explicitly refresh the cache when needed return True