From 3b7bc19dba28544fe6020af2f814b01c5f00ccc4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 26 Aug 2020 13:42:17 +0100 Subject: [PATCH] Removing old posts from cache --- utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.py b/utils.py index 4387f5dcb..c4dc8f286 100644 --- a/utils.py +++ b/utils.py @@ -771,6 +771,7 @@ def updateRecentPostsCache(recentPostsCache: {}, maxRecentPosts: int, recentPostsCache['html'][postId] = htmlStr while len(recentPostsCache['html'].items()) > maxRecentPosts: + postId = recentPostsCache['index'][0] recentPostsCache['index'].pop(0) del recentPostsCache['json'][postId] del recentPostsCache['html'][postId]