Hi,
I am using JBoss cache as 2nd level cache in Hibernate.
But I am trying to use region based caching, so that cache regions of different tables refresh in different time intervals.
I have configured my settings as per below but cache is refreshing based on default region settings i.e.
Code:
<region name="/_default_">
Am I missing something?
JBoss Cache configuration (region only)Code:
<region name="/SYSTEM_PARAMETER">
<attribute name="maxNodes">50000</attribute>
<attribute name="timeToLiveSeconds">7200</attribute>
<attribute name="maxAgeSeconds">7200</attribute>
</region>
HIbernate configuration (hbm file)Code:
<hibernate-mapping package="com.shkco.nwte.common.datamodel">
<class name="SystemParameter" table="SYSTEM_PARAMETER">
<cache usage="read-only"/>
..
</class>
</hibernate-mapping>
Java CodeCode:
query.setCacheable(true);
query..setCacheRegion("SYSTEM_PARAMETER");
where query if of type "org.hibernate.Query"