Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant