diff --git a/utils/data_loader.py b/utils/data_loader.py index 569199d1..15397c5e 100644 --- a/utils/data_loader.py +++ b/utils/data_loader.py @@ -9,9 +9,11 @@ def load_all_projects(): - """Read and return the full list of projects from the JSON file.""" - with open(DATA_FILE, "r", encoding="utf-8") as f: - return json.load(f) + global _projects_cache + if _projects_cache is None: + with open(DATA_FILE, "r", encoding="utf-8") as f: + _projects_cache = json.load(f) + return _projects_cache def find_project_by_id(project_id):