5 Replies Latest reply on Jul 14, 2012 4:02 AM by Galder Zamarreño

    Handling expiration events in the app

    Vladimir Dzhuvinov Novice

      Hi guys!


      We have a web app with a primary cache and a number of auxiliary caches with entries depending on the primary ones. When an entry in the primary cache expires this should trigger various cascading operations in the dependant caches with the key of the expiring primary entry as an argument.


      If my understanding is correct, Infinispan doesn't support expiration listeners (ISPN-694). What is then the recommended approach to allow an application to act on entry expiration?


      The solution that comes to my mind is to write our own in-app expiration code, based on Cache.entrySet() and removeAsync(). Is this the most efficient approach? I read that entrySet() is not a cheap operation with replicated/distributed caches.


      Your advice will be greatly appreciated.