-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement caching via tasks instead of shared mutexes
This helps prevent a rare suboptimal case where a visitor to the playground triggered the crates / versions request but then left the site before the request finished, resulting in the request being canceled and the work being wasted without being cached. This mostly showed up when running heavy load tests locally to try and suss out other bugs. Other benefits: - This will also result in reduced contention when multiple requests would have triggered a cache refresh. Only one computation should occur. - The cache value is now computed out-of-band and requests should not block on it.
- Loading branch information
1 parent
db8a083
commit f116c28
Showing
2 changed files
with
358 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.