Locking Cache Key without Locking the entire Cache
- by Gandalf
I have servlets that caches user information rather then retrieving it from the user store on every request (shared Ehcache). The issue I have is that if a client is multi-threaded and they make more then one simultaneous request, before they have been authenticated, then I get this in my log:
Retrieving User [Bob]
Retrieving User [Bob]…