Class InvalidationExoCache<K extends Serializable,V>

java.lang.Object
org.exoplatform.services.cache.invalidation.InvalidationExoCache<K,V>
All Implemented Interfaces:
CacheListener<K,HashCode<V>>, ExoCache<K,V>

public class InvalidationExoCache<K extends Serializable,V> extends Object implements ExoCache<K,V>, CacheListener<K,HashCode<V>>
This eXo cache type is a decorator allowing ExoCache instances that have big values or non serializable values to be replicated thanks to an invalidation mechanism. To prevent infinite loop described below, we replicate the hash code of the value such that if the hash code is the same, we don't invalidate the value locally
  • Cluster node #1 puts (key1, value1) into the cache
  • On cluster node #2 key1 is invalidated by the put call in node #1
  • Node #2 re-loads key1 and puts (key1, value1) into the cache
  • On cluster node #1 key1 is invalidated, so we get back to step #1