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

there's a race condition between checking if something is in the cache and actually putting it in the cache. A more correct solution would have all threads wait while one does the actual work.

This gets more complicated if you have a distributed cache and/or distributed application servers. The typical solution there is to allow at most one computation per process/device.



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

Search: