custom query cache values are not overridden as shown in logs.
ulablue Apr 21, 2017 5:22 AMHello,
I have defined the custom region for query cache as shown below. I have overridden specific config for this region but yet in the logs, it shows all of those configs as "0". Does it mean the configuration that are provided in standalone.xml are not taken in to effect ? Am I missing something in my configuration?
persistence.xml
<property name="hibernate.cache.region_prefix" value=""/>
<property name="hibernate.cache.infinispan.data-region.cfg" value= "data-local-query"/>
standalone.xml
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan" statistics-enabled="true">
<local-cache name="entity">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="local-query">
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="data-local-query" statistics-enabled="true">
<eviction strategy="LRU" max-entries="12000" />
<expiration max-idle="14400000" interval="120000" lifespan="86400000"/>
</local-cache>
<local-cache name="timestamps"/>
</cache-container>
Why is it "0" even the default local query cache has values for max entries as 10000 ? Are these logs are wrong ?
logs
2017-04-21 10:39:29,244 INFO [org.hibernate.cache.internal.StandardQueryCache] (default task-13) HHH000248: Starting query cache at region: data-region
2017-04-21 10:39:29,244 DEBUG [org.hibernate.cache.infinispan.InfinispanRegionFactory] (default task-13) Building query results cache region [data-region]
2017-04-21 10:39:29,245 DEBUG [org.hibernate.cache.infinispan.InfinispanRegionFactory] (default task-13) Cache region specific configuration exists: TypeOverrides{cache=data-local-query, strategy=null, wakeUpInterval=0, maxEntries=0, lifespan=0, maxIdle=0}
2017-04-21 10:39:29,246 DEBUG [org.hibernate.cache.infinispan.InfinispanRegionFactory] (default task-13) Configuration override via property hibernate.cache.infinispan.statistics: null
2017-04-21 10:39:29,265 INFO [org.jboss.as.clustering.infinispan] (default task-13) WFLYCLINF0002: Started data-region cache from hibernate container
If I start to run some tests, I can see below logs which seems to show that it is fetching results from query cache. But is it really working ? how can I prove that this works with my overridden configuration ? Thanks in advance.
2017-04-21 11:05:31,684 DEBUG [org.hibernate.cache.internal.StandardQueryCache] (default task-6) Checking query spaces are up-to-date: [TABLE1]
2017-04-21 11:05:31,684 DEBUG [org.hibernate.cache.internal.StandardQueryCache] (default task-6) Returning cached query results