Cache Item Invalidation

classic Classic list List threaded Threaded
4 messages Options
martybjones@gmail.com martybjones@gmail.com
Reply | Threaded
Open this post in threaded view
|

Cache Item Invalidation

How do you guys handle invalidating cache items when the underlying data is changed within say a database you are using to create cache items with?
akorensh akorensh
Reply | Threaded
Open this post in threaded view
|

Re: Cache Item Invalidation

martybjones@gmail.com martybjones@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Cache Item Invalidation

I understand the expiration policies but my question is about automatically expiring a cache entry when an external event occurs such as a database table column changes.

On Wed, May 20, 2020 at 9:49 AM akorensh <[hidden email]> wrote:
Hi,
  Take a look at: https://apacheignite.readme.io/docs/expiry-policies
   Also pay attention to: https://apacheignite.readme.io/docs/evictions
Thanks, Alex



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
akorensh akorensh
Reply | Threaded
Open this post in threaded view
|

Re: Cache Item Invalidation

For external events, you would need to monitor those events and expiry
manually.
Ignite does have notification capabilities int the form of events for cache
put/get and other operations
see here: https://apacheignite.readme.io/docs/events
You can use that

example:
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/