use hardcoded cache size instead of len(blog)

It seems the blog posts are not rotated strictly chronologically,
so sometimes previously already posted things got posted again.
master
lub 4 years ago
parent 00b6811a20
commit 0130d63551

@ -176,9 +176,7 @@ async def main():
pass pass
# trim the cache # trim the cache
# len(blog) is usually bigger than the count of posts in our category, while len(cache) > 100:
# so with len(blog) instead of the latter we have some buffer
while len(cache) > len(blog):
cache.remove(cache[0]) cache.remove(cache[0])
# set new cache event # set new cache event

Loading…
Cancel
Save