You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Christian Seiler <ch...@interes.com> on 2016/02/17 17:22:43 UTC
ExpiryPolicy based on cache element
Hello all,
is there an elegant way to base the expiry of a cache element on properties of the element itself?
My solution would be to schedule a (Scan)Query with an arbitrary predicate and gather the elements to be expired.
I would then remove those elements using cache.removeAll(Set keys).
Is there a way to combine these two steps into one and even co-locate that step with the data?
Any other options?
Regards
Christian
--
InteRes GmbH - Dr. Christian Seiler
Rheinstrasse 44-46 64283 Darmstadt
fon: +49 6151 307 40 18 fax: -11
www.interes.com christian.seiler@interes.com
Geschäftsführer:
Volker Herrmann
Registergericht: Amtsgericht Darmstadt
Registernummer: HRB 6831/Darmstadt
Steuernummer: DE 189 632 313
ITB Berlin - Sie finden uns als Mitaussteller am DRV-Stand in Halle 10.1. Schauen Sie vorbei, wir freuen uns!
AW: ExpiryPolicy based on cache element
Posted by Christian Seiler <ch...@interes.com>.
Hi Val,
I will go the way you suggested and see how far I can get with that.
Thank you for the quick response!
Regards
Christian
--
InteRes GmbH - Dr. Christian Seiler
Rheinstrasse 44-46 64283 Darmstadt
fon: +49 6151 307 40 18 fax: -11
www.interes.com christian.seiler@interes.com
Geschäftsführer:
Volker Herrmann
Registergericht: Amtsgericht Darmstadt
Registernummer: HRB 6831/Darmstadt
Steuernummer: DE 189 632 313
ITB Berlin - Sie finden uns als Mitaussteller am DRV-Stand in Halle 10.1. Schauen Sie vorbei, wir freuen uns!
-----Ursprüngliche Nachricht-----
Von: vkulichenko [mailto:valentin.kulichenko@gmail.com]
Gesendet: Mittwoch, 17. Februar 2016 22:14
An: user@ignite.apache.org
Betreff: Re: ExpiryPolicy based on cache element
Hi Christian,
You can broadcast a closure which will use IgniteCache.localEntries() method
to iterate through the local data and remove all required data. This way you
will minimize the network utilization.
Will this work for you?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ExpiryPolicy-based-on-cache-element-tp3059p3062.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: ExpiryPolicy based on cache element
Posted by vkulichenko <va...@gmail.com>.
Hi Christian,
You can broadcast a closure which will use IgniteCache.localEntries() method
to iterate through the local data and remove all required data. This way you
will minimize the network utilization.
Will this work for you?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ExpiryPolicy-based-on-cache-element-tp3059p3062.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.