mirror of https://gitlab.com/bashrc2/epicyon
Removing old posts from cache
parent
593893206c
commit
3b7bc19dba
1
utils.py
1
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]
|
||||
|
|
Loading…
Reference in New Issue