add some buffer to our cache

master
lub 4 years ago
parent 5b37157a49
commit 09b86f2951

@ -172,7 +172,9 @@ async def main():
# add url to cache
cache += [post['url']]
while len(cache) > len(blog):
# check for double the post count, to have some buffer for manually purging URLs
# otherwise the cache could reshuffle when you remove too many URLs at once
while len(cache) > len(blog)*2:
cache.remove(cache[0])
set_state = await matrix[next(iter(matrix))].room_put_state(room_id=admin_room,
event_type=event_type_prefix+'cache',

Loading…
Cancel
Save