ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: How to implement a custom ExpiryPolicy based on Entity attributes
Date Wed, 16 Mar 2016 18:58:56 GMT
Hi,

You can define the expiry policy for a particular update when doing a put:

if (!employee.has401k)
    cache.withExpiryPolicy(new CreatedExpiryPolicy(new
Duration(TimeUnit.SECONDS, 5))).put(key, employee);
else
    cache.put(key, employee);

Will this work for you?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-implement-a-custom-ExpiryPolicy-based-on-Entity-attributes-tp3537p3545.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message