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

Incrementally clear cache after update rather than all at once #83

Open
Ameobea opened this issue Jul 8, 2020 · 0 comments
Open

Incrementally clear cache after update rather than all at once #83

Ameobea opened this issue Jul 8, 2020 · 0 comments

Comments

@Ameobea
Copy link
Owner

Ameobea commented Jul 8, 2020

Currently, we drop the entire cache all at once as soon as each hourly scrape finishes. This has the effect of flooding the database with queries all at once and making the website very slow and in some cases even unresponsive while the cache re-populates.

The clearing of the cache can be mitigated by clearing it one piece at a time. Maybe clear the popularity history, wait 30 seconds, clear the quote history, wait 30 seconds, clear all or a part of the popularity changes cache, etc.

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

No branches or pull requests

1 participant