Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The meaning of evict() in infinispan cache

Tags:

infinispan

According to the docs for infinispan: http://docs.jboss.org/infinispan/5.0/apidocs/ the evict() API does not remove the entry from any other cache stores in the cluster, on the cache store it was invoked on.

If using "replication" mode, where the data is replicated across the caches, surely it has to be consisted and using the evict() API will make it inconsistent.

How then is the inconsistency resolved?

Thanks

like image 645
Breako Breako Avatar asked Jan 23 '26 14:01

Breako Breako


1 Answers

Evict removes the entry only from the memory on the node where you call it. It does not make the cache inconsistent, because if you call cache.get() and the entry is not found in memory, it is loaded from cache store.

As the documentation states, the purpose is to inform cache that it won't use the entry for some time and the node can free some memory.

like image 154
Radim Vansa Avatar answered Jan 26 '26 20:01

Radim Vansa