We are considering using ehcache (1.6.0-beta5) to enable second level caching of a number of tables which are never modified. We have set up a read-only ehcache region for this table and currently it seems to be working fine. The Hibnerate POJOs stored in the cache are all immutable.
One of the developers here raised an issue that there is a significant performance decrease in the time taken to 'hydrate' objects from the ehcache, that is, the mapping from ehcache's internal representation of an entity to an actual java object. Instead he suggested we store objects manually in a cache of our own. This would require significant modification of our code and I have reservations on how big the improvement would be.
My questions are:
Thanks for any help.
You should profile the time it takes for hydration. And if that is significat (at least a couple of percents) you should think about changing code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With