robintrack icon indicating copy to clipboard operation
robintrack copied to clipboard

Incrementally clear cache after update rather than all at once

Open Ameobea opened this issue 4 years ago • 0 comments

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.

Ameobea avatar Jul 08 '20 18:07 Ameobea