From e283544570644cd0483dcbe2ec65a4bbcd05201a Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 14 Jun 2023 23:24:28 +0300 Subject: [PATCH] only cache posts in redis on WPD --- files/routes/posts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 5fad7bf53c..6f369893c3 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -96,7 +96,7 @@ def post_id(pid, anything=None, v=None, sub=None): p.views += 1 g.db.add(p) - if not v and not request.values.get("sort"): + if SITE == 'watchpeopledie.tv' and not v and not request.values.get("sort"): result = cache.get(f'post_{p.id}') if result: return result @@ -184,7 +184,7 @@ def post_id(pid, anything=None, v=None, sub=None): sort=sort, render_replies=True, offset=offset, sub=p.subr, fart=get_setting('fart_mode')) - if not v and not request.values.get("sort"): + if SITE == 'watchpeopledie.tv' and not v and not request.values.get("sort"): cache.set(f'post_{p.id}', result) return result