Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Caching: high database usage after cache cleanup #4531
When the redirect cache is invalidated (either from the admin panel, or via CLI), or it expires (default to 28 days), it gets automatically re-populated with the next http request.
If the redirects list is big enough (~14k entries here), and the website serves enough traffic, this creates a cache stampede effect, where each http request tries to warm the redirect cache, creating a peak of queries on the database:
The relevant code is
Adding a mutex would help the stability of the system.