My JPA aaplication is using WildFly 8.2.1 second level cache.
The settings in server are default & the persistence unit added following to enable caching:
<property name="hibernate.cache.use_second_level_cache" value="true" />
<property name="hibernate.cache.use_query_cache" value="true" />
<property name="hibernate.cache.region.factory_class" value="org.jboss.as.jpa.hibernate5.infinispan.InfinispanRegionFactory"/>
<property name="hibernate.cache.infinispan.cachemanager" value="java:jboss/infinispan/container/hibernate"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="hibernate.cache.infinispan.entity.eviction.strategy" value="LRU"/>
<property name="hibernate.cache.infinispan.entity.eviction.wake_up_interval" value="5000"/>
<property name="hibernate.cache.infinispan.entity.eviction.max_entries" value="10000"/>
<property name="hibernate.cache.infinispan.entity.expiration.lifespan" value="-1"/>
<property name="hibernate.cache.infinispan.entity.expiration.max_idle" value="900000"/>
Is there anything else needed?
I found this:
<!-- Not needed any more in WildFly 10
<property name="hibernate.cache.region.factory_class"
value="org.jboss.as.jpa.hibernate5.infinispan.SharedInfinispanRegionFactory"/> -->
We need this in lower wildfly versions?