From c764804c78c1601a678bb615da1e9c56d977d27e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 20 Sep 2021 16:02:46 +0200 Subject: [PATCH] fdsf --- files/routes/front.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index d592c3685..fdd0fd3ad 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -109,6 +109,7 @@ def notifications(v): +@cache.memoize(timeout=3600) def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='', **kwargs): posts = g.db.query(Submission).options(lazyload('*')) @@ -223,8 +224,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' @auth_desired def front_all(v): - ti = time.time() - if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect("/logged_out") if v and "logged_out" in request.full_path: v = None @@ -258,7 +257,6 @@ def front_all(v): if v and v.hidevotedon: posts = [x for x in posts if not hasattr(x, 'voted') or not x.voted] - print(time.time() - ti) if request.headers.get("Authorization"): return {"data": [x.json for x in posts], "next_exists": next_exists} else: return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)