user7441088
user7441088

Reputation: 17

Infinispan 11.x - 12.x Clear a RemoteCache Limiting Notification for Listeners

I have an Infinispan RemoteCache in a microservice A which is responsible of inserting/deleting entries inside it.

There is a microservice B which is subscribed to that RemoteCache (replicated entirely locally) that has a listener to catch entry-level operations, such as inserts or deletes, to mentain its local copy updated.

I was wondering if there is a way to catch from the B listener if a clear() operation happened on the RemoteCache map. I was not able to find anything in the documentation.

This is because, if the RemoteCache has a lot of entries, and A calls a clear() on it, I'd not like to receive each single notification and then perform a delete operation for each single entry in the B local cache. I'd rather to call the clear() method for the B local copy directly, instead.

Thank you in advance for your help (my "question" is in bold).

Upvotes: 1

Views: 53

Answers (1)

pruivo
pruivo

Reputation: 1334

Unfortunately, there is no clear event.

I'm not sure why you need a local copy of data in B but, the hot rod client has a near-cache which caches locally the most accessed keys.

Upvotes: 1

Related Questions