Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions utils/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading