configuration file - region caches
matth Nov 24, 2010 4:32 AMHi,
I use infinispan and i've created different regions of cache. I want one of my region ("temp") to be configured with an expiration lifespan. So I have configured my configuration the following way :
<namedCache name="entity">
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
lockAcquisitionTimeout="15000" useLockStriping="false" />
<!-- Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds.
0 means the eviction thread will never run. A separate executor is used for eviction in each cache. -->
<eviction wakeUpInterval="5000" maxEntries="100000" strategy="LRU"/>
<expiration maxIdle="300000"/>
<lazyDeserialization enabled="true"/>
</namedCache>
<!-- A config appropriate for query caching. Does not replicate queries. -->
<namedCache name="local-query">
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
lockAcquisitionTimeout="15000" useLockStriping="false"/>
<!--Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means
the eviction thread will never run. A separate executor is used for eviction in each cache. -->
<eviction wakeUpInterval="5000" maxEntries="10000" strategy="LRU"/>
<expiration lifespan="300000" maxIdle="300000"/>
</namedCache>
<!-- Optimized for timestamp caching. A clustered timestamp cache
is required if query caching is used, even if the query cache
itself is configured with CacheMode=LOCAL. -->
<namedCache name="timestamps">
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
lockAcquisitionTimeout="15000" useLockStriping="false"/>
<lazyDeserialization enabled="true"/>
<!-- Don't ever evict modification timestamps -->
<eviction wakeUpInterval="0" strategy="NONE"/>
</namedCache>
<namedCache name="temp">
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
lockAcquisitionTimeout="15000" useLockStriping="false" />
<!-- Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds.
0 means the eviction thread will never run. A separate executor is used for eviction in each cache. -->
<eviction wakeUpInterval="5000" maxEntries="100000" strategy="LRU"/>
<expiration lifespan="60000"/>
<lazyDeserialization enabled="true"/>
</namedCache>
Normally the "temp" region should be cleared every minute but it isn't : if the cache "local-query" isn't purged, no requests are executed and i retrieve inconsistent data.
Do you have any idea about how to configure such a region ?
Thanks!
Btw if i clear my region programmatically it works :
this.regionFactory.getCacheManager().getCache(this.region).clear();