You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to find a library that can tackle caching and cache re-validation.
For example when the cache is not available, I would like the first request execute the function but concurrent ones to wait until the first has finished instead of executing the function as well.
Hey @Benoss, I built a library called yapcache that does what you're looking for - It makes sure only one request executes the underlying function when the cache is empty, to prevent stampedes. And it uses the cachebox library under the hood.
Hey @Benoss, I built a library called yapcache that does what you're looking for - It makes sure only one request executes the underlying function when the cache is empty, to prevent stampedes. And it uses the cachebox library under the hood.
Thanks, I will give it a go. Love the name of the lib BTW
I am trying to find a library that can tackle caching and cache re-validation.
For example when the cache is not available, I would like the first request execute the function but concurrent ones to wait until the first has finished instead of executing the function as well.
This is to avoid https://en.wikipedia.org/wiki/Cache_stampede
a good resource on the subject: https://grantjenks.com/docs/diskcache/case-study-landing-page-caching.html
Here is a simple example where I would expect only one concurrent API call at a time
The text was updated successfully, but these errors were encountered: