This commit is contained in:
Aevann1 2021-08-31 18:32:04 +02:00
parent b5363997f8
commit 7a66f91f13
2 changed files with 7 additions and 7 deletions

View file

@ -72,7 +72,7 @@ def notifications(v):
render_replies=True,
is_notification_page=True)
@cache.memoize()
@cache.memoize(timeout=86400)
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='', **kwargs):
posts = g.db.query(Submission).options(lazyload('*'))
@ -226,7 +226,7 @@ def front_all(v):
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)
@cache.memoize()
@cache.memoize(timeout=86400)
def changeloglist(v=None, sort="new", page=1 ,t="all", **kwargs):
posts = g.db.query(Submission).options(lazyload('*')).filter_by(is_banned=False, private=False,).filter(Submission.deleted_utc == 0)
@ -340,7 +340,7 @@ def random_post(v):
post = x.order_by(Submission.id.asc()).offset(n).limit(1).first()
return redirect(post.permalink)
@cache.memoize()
@cache.memoize(timeout=86400)
def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", **kwargs):
posts = g.db.query(Submission).options(lazyload('*'))