Blaxzter commited on
Commit
d8f6efe
1 Parent(s): 7909a1d

Update handler.py

Browse files

Increase cache clean interval

Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -37,7 +37,7 @@ class EndpointHandler():
37
 
38
  def _cleanup_cache(self):
39
  current_time = time.time()
40
- if current_time - self.last_cache_cleanup > 5 and len(self.cache) > self.max_cache_entries:
41
  # Sort the cache by last access time
42
  sorted_cache = sorted(self.cache.items(), key = lambda x: x[1]["last_access"])
43
 
 
37
 
38
  def _cleanup_cache(self):
39
  current_time = time.time()
40
+ if current_time - self.last_cache_cleanup > 60 and len(self.cache) > self.max_cache_entries:
41
  # Sort the cache by last access time
42
  sorted_cache = sorted(self.cache.items(), key = lambda x: x[1]["last_access"])
43