对于HTTP缓存,在出现可能修改资源的服务器端状态的资源交互时,缓存项将失效。
In the case of HTTP caching, the cache entries are invalidated in case an interaction with the resource occurs that potentially modifies the server side state of the resource.
当一执行绪将资源修改为无效状态,而接著另一执行绪尝试存取这个资源并在无效状态中使用它时,就出现竞争情形。
A race condition exists when a thread modifies a resource to an invalid state, and then another thread attempts to access that resource and use it in the invalid state.
译文:当开始和共享资源交互的时候,我们将它的状态设置成“ <token> ”,然后仅在token没改变的情况下我们才执行“读取-修改-写回”操作。
When starting to work with a shared resource, we set its state to " <token> ", then we operate the read-modify-write only if the token is still the same when we write.
应用推荐