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 3 years ago
parent 00b6811a20
commit 0130d63551

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

Loading…
Cancel
Save