From 103bafd9bd8903c95a2ea7469c39ffdd013ec90e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 6 Oct 2018 18:29:47 -0400 Subject: Remove lru_cache from git.py I wonder if this is causing our OOM issues... and if it's not, I want to know if it's actually necessary. --- gitsrht/git.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gitsrht/git.py b/gitsrht/git.py index 257e954..a3f0e92 100644 --- a/gitsrht/git.py +++ b/gitsrht/git.py @@ -1,6 +1,5 @@ from collections import deque from datetime import datetime, timedelta, timezone -from functools import lru_cache from gitsrht.redis import redis from pygit2 import Repository, Tag from jinja2 import Markup, escape @@ -21,11 +20,10 @@ def commit_time(commit): diff = datetime.now(timezone.utc) - tzaware return datetime.utcnow() - diff -@lru_cache(maxsize=256) +# TODO: this is no longer cached so we should probably get rid of it def CachedRepository(path): return _CachedRepository(path) -@lru_cache(maxsize=1024) def _get_ref(repo, ref): return repo._get(ref) -- cgit v1.2.3