| Sebastien Tardif, I looked at your attached test. As you mention the cached value is not invalidated after a merging a stale value using EhCache. I'm confused about your other test, testOptimisticLockException_Flush_LocalV0_CacheV0_DBV1. When I debug this test, mana2 is read from the DB, not the cache, so it is not stale. In other words, OptimisticLockException should not be expected. emp2 is read from the cache and is up-to-date. |