How to force re-read db data (without turning off the second level cache before reading), and then put it in the cache.
The use case is as follows:
There is a service that uses dictionary data. Service is under heavy load, so performance is imperative. I would like the dictionary data to always be available in the second level cache for the service. Dictionary data can be modified externally, so the cache needs to be updated periodically.
Is it possible to "update" the second-level cache so that other SessionFactory clients do not cause hits in db (they will receive old elements while updated data is updated).
ehcache used as a cache provider, but it can be reasonably changed.
source share