forked from rDrama/rDrama
fsfs
parent
5e7478d7f8
commit
1f6a4b0130
|
@ -225,7 +225,7 @@ class User(Base, Stndrd, Age_times):
|
|||
def strid(self):
|
||||
return str(self.id)
|
||||
|
||||
@cache.memoize(timeout=86400)
|
||||
@cache.memoize(timeout=3600)
|
||||
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)):
|
||||
|
@ -443,7 +443,7 @@ class User(Base, Stndrd, Age_times):
|
|||
if self.bannerurl: return self.bannerurl
|
||||
else: return f"https://{site}/assets/images/{site_name}/preview.webp"
|
||||
|
||||
@cache.memoize(timeout=86400)
|
||||
@cache.memoize(timeout=3600)
|
||||
def defaultpicture(self):
|
||||
pic = random.randint(1, 150)
|
||||
return f"https://{site}/assets/images/defaultpictures/{pic}.webp"
|
||||
|
|
|
@ -108,7 +108,7 @@ def notifications(v):
|
|||
is_notification_page=True)
|
||||
|
||||
|
||||
@cache.memoize(timeout=86400)
|
||||
@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('*'))
|
||||
|
@ -262,7 +262,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=86400)
|
||||
@cache.memoize(timeout=3600)
|
||||
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)
|
||||
|
@ -374,7 +374,7 @@ def random_post(v):
|
|||
post = x.offset(n).limit(1).first()
|
||||
return redirect(f"/post/{post.id}")
|
||||
|
||||
@cache.memoize(timeout=86400)
|
||||
@cache.memoize(timeout=3600)
|
||||
def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", **kwargs):
|
||||
|
||||
posts = g.db.query(Submission).options(lazyload('*'))
|
||||
|
|
Loading…
Reference in New Issue