From b0069e18e0b66bea361dd2d8d4f6b05a12b973e6 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 5 Aug 2023 13:32:29 +0300 Subject: [PATCH] fix emoji cachebusting --- files/routes/static.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index a61b03ffc..e5bb06c86 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -41,7 +41,7 @@ def reddit_post(subreddit, v, path): return redirect(f'https://{reddit}/{post_id}') -@cache.cached(key_prefix="emoji_list") +@cache.cached(make_cache_key=lambda:"emoji_list") def get_emoji_list(): emojis = [] for emoji, author in g.db.query(Emoji, User).join(User, Emoji.author_id == User.id).filter(Emoji.submitter_id == None).order_by(Emoji.count.desc()): @@ -77,7 +77,7 @@ def emoji_list(v): -@cache.cached(key_prefix="emojis") +@cache.cached(make_cache_key=lambda:"emojis") def get_emojis(): emojis = g.db.query(Emoji, User).join(User, Emoji.author_id == User.id).filter(Emoji.submitter_id == None) emojis1 = emojis.filter(Emoji.kind != 'Marsey Alphabet').order_by(Emoji.count.desc()).all()