From e04346a0f25f4a2d87388cad877a54f0a03a57ea Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 10 Nov 2025 10:22:34 -0800 Subject: [PATCH] chore: remove unused cache.py file File was identified as unused with no external references in the codebase. This cleanup reduces codebase clutter and potential confusion. --- cache.py | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 cache.py diff --git a/cache.py b/cache.py deleted file mode 100644 index a22a6bd..0000000 --- a/cache.py +++ /dev/null @@ -1,43 +0,0 @@ -# In-memory cache for Filevine projects -import threading -import time -from datetime import datetime, timedelta - -class ProjectCache: - def __init__(self): - self._cache = {} - self._lock = threading.Lock() - self._last_updated = None - self._is_updating = False - - def get_projects(self): - """Get cached projects if they exist and are not expired (15 minutes)""" - with self._lock: - if not self._cache or not self._last_updated: - return None - - # Check if cache is older than 15 minutes - if datetime.now() - self._last_updated > timedelta(minutes=15): - return None - - return self._cache.copy() - - def set_projects(self, projects): - print(f"Caching new projects: {len(projects)}") - """Set projects in cache with current timestamp""" - with self._lock: - self._cache = projects.copy() if projects else {} - self._last_updated = datetime.now() - - def is_updating(self): - """Check if cache is currently being updated""" - with self._lock: - return self._is_updating - - def set_updating(self, updating): - """Set the updating status""" - with self._lock: - self._is_updating = updating - -# Global cache instance -project_cache = ProjectCache()