Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch execution order of scrub_items() and prune_news() #27

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

zstyblik
Copy link
Owner

@zstyblik zstyblik commented Jun 9, 2024

Rationale was that cache scrub would reduce number of items to iterate through later. However, if expiration hasn't been updated in "long" time eg. due to error or low traffic(HTTP Staus Code 304), then the whole cache gets invalidated which leads to excess flood.

One solution is to increase cache expiration(in other words one day is really low).
Another solution seems to be to switch order of execution, because prune_news() updates time of expiration. Therefore, it should prevent scrubbing of news which are still present in RSS feed. And it's also possible there is a bug somewhere in the code.

Rationale was that cache scrub would reduce number of items to iterate
through later. However, if expiration hasn't been updated in "long"
time eg. due to error or low traffic(HTTP Staus Code 304), then the
whole cache gets invalidated which leads to excess flood.

One solution is to increase cache expiration(in other words one day is
really low).
Another solution seems to be to switch order of execution, because
prune_news() updates time of expiration. Therefore, it should prevent
scrubbing of news which are still present in RSS feed.
And it's also possible there is a bug somewhere in the code.
@zstyblik zstyblik force-pushed the switch_scrub_prune branch from eadf83f to 501068a Compare June 10, 2024 08:03
@zstyblik zstyblik merged commit ec54814 into master Jun 10, 2024
1 check passed
@zstyblik zstyblik deleted the switch_scrub_prune branch June 10, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant