master
Aevann1 2021-09-20 16:31:58 +02:00
parent 381c57a79e
commit 0fbd8f1909
2 changed files with 4 additions and 4 deletions

View File

@ -235,7 +235,7 @@ class User(Base):
def strid(self):
return str(self.id)
@cache.memoize(timeout=3600)
@cache.memoize(timeout=86400)
def userpagelisting(self, v=None, page=1, sort="new", t="all"):
if self.shadowbanned and not (v and (v.admin_level >= 3 or v.id == self.id)):

View File

@ -109,7 +109,7 @@ def notifications(v):
@cache.memoize(timeout=3600)
@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('*'))
@ -264,7 +264,7 @@ def front_all(v):
else: return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
@cache.memoize(timeout=3600)
@cache.memoize(timeout=86400)
def changeloglist(v=None, sort="new", page=1 ,t="all", **kwargs):
posts = g.db.query(Submission).options(lazyload('*')).options(lazyload('*')).filter_by(is_banned=False, private=False,).filter(Submission.deleted_utc == 0)
@ -376,7 +376,7 @@ def random_post(v):
post = x.offset(n).limit(1).first()
return redirect(f"/post/{post.id}")
@cache.memoize(timeout=3600)
@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('*'))