Breako Breako
Breako Breako

Reputation: 6451

The meaning of evict() in infinispan cache

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

Upvotes: 3

Views: 952

Answers (1)

Radim Vansa
Radim Vansa

Reputation: 5888

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.

Upvotes: 3

Related Questions