Is there a way to stop another request thread updating a cache entry whilst you are using it.
Scenario is that we want to limit the number of failed login attempts by an end user and lock the account once the limit has been exceeded. We were planning on storing the failed attempts in the cache but that seems unsafe as a large number of failed requests for a single user in a short period of time could result in read, read, read, write, write, write scenario as opposed to the desired read, write, read, write, read write. That would mean that you could easily exceed the allowed number of requests before locking kicked in.