Hi Val,

do you mean that when cache is expired, I have to call cache.remove(key) manually in order to 
call delete in cachestore?

I try to implement by remote listener like this:

ignite.events().remoteListen(null, new IgnitePredicate<CacheEvent>()
{
@IgniteInstanceResource
private Ignite ignite;

@LoggerResource
private IgniteLogger logger;

@Override
public boolean apply(CacheEvent event)
{
logger.info("remove cache  " + event.cacheName() + "for key " + event.key());
ignite.cache(event.cacheName()).remove(event.key());
return true;
}
}, EventType.EVT_CACHE_OBJECT_EXPIRED);

it seems that it doesn't work. I don't see any logs of calling it. what i missed?

Thanks
Shawn
On 02/2/2017 05:27vkulichenko<valentin.kuliche...@gmail.com> wrote:
Hi Shawn,

Built in expiration is cache expiration, which by definition doesn't touch
database. This means that you need to manually use remove() operation to
delete from both cache and store. I think approach #1 is the best way to
approach this.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/simple-file-based-persistent-store-support-TTL-tp10355p10365.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to