Hi,
I have an issue with my ehCache where i set the time to live for my element and it does not trigger the listener when the time to live has passed.
However if i set it to 5 minutes and i access the cache item on 6 minutes it will give me the expired notification on the listener and then proceed with accessing the item.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" updateCheck="false">
<!--
| Please see http://ehcache.sourceforge.net/documentation/configuration.html for
| detailed information on how to configurigure caches in this file
+-->
<!-- Location of persistent caches on disk -->
<diskStore path="java.io.tmpdir/ss7Agent" />
<terracottaConfig url="192.168.8.195:9510"/>
<defaultCache eternal="false"
maxElementsInMemory="1000"
timeToIdleSeconds="0"
timeToLiveSeconds="600"
memoryStoreEvictionPolicy="LRU"/>
<cache name="ActiveIslSubCache"
eternal="true"
maxElementsInMemory="300"
timeToLiveSeconds="100"
memoryStoreEvictionPolicy="LRU">
<terracotta />
<cacheEventListenerFactory class="com.mt.isl.core.cache.listener.ehCacheEventListenerFactory"/>
</cache>
</ehcache>
this is my config and I have the terracota server running on another machine and developing on my own laptop.
I tested with the listener on whether it gets the event when i put an element into the cache and this works fine.
Expired event doesnt seem to be working.
Regards
Nick