Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sounds similar to the behavior of Guava's LoadingCache. If you try to fetch a key that's not in the cache, the supplied callback is used to fetch it. While the value is being loaded, other threads can access the cache concurrently, but if a second thread asks for the same key, it will wait for the first load to complete instead of redundantly fetching the same value.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: