I am using Hibernate 3.5.1, which comes with EHCache 1.5.
If I want to use the latest version of EHCache (2.0.1), is it just a matter of removing ehcache-1.5.jar from my project and replacing ehcache-core-2.0.1.jar? Any problems you need to know?
Also, is this “cache area” in the Hibernate mapping file the same as the “cache name” in the xh ehcache configuration? What I want to do is define 2 cache areas - one for read-only reference objects that won't change (search lists, etc.), and one for all other objects. So in ehcache I want to define two elements:
<cache name="readonly"> ... </cache> <cache name="mutable"> ... </cache>
And then in the Hibernate mapping files, I will specify the cache that will be used for each object:
<hibernate-mapping> <class name="lookuplist"> <cache region="readonly" usage="read-only"/> <property> ... </property> </class> </hibernate-mapping>
Will this work? Some of the documentation seems to imply creating a separate region / cache for each class mapped ...
Thanks.
source share