[infinispan-dev] Eviction thread and purging expired entries

Manik Surtani manik at jboss.org
Fri Jul 23 08:48:32 EDT 2010


On 23 Jul 2010, at 13:11, Mircea Markus wrote:

>>> What I have in mind is: cache store has a a boolean field set to true if it has entries that can expire, false otherwise. It is in full control of the modifications applied to it and it can update this flag accordingly. 
>>> if the flag is false, then when asked to purge the store won't do anything. So if one doesn't use expiry at all, it won't even have to configure anything to disable it.
>>> I've implemented this for BucketBasedCacheStore and is really simple (attached). 
>>> <purging_optimization.patch>
>> 
>> How would this work for shared cache stores?
> It would be the cache store where the data was written that would do the purging.

Makes sense (-ish).  How would you deal with failover?  E.g., C1, C2, C3 all write to shared cache store S.  C1, C2 both store immortal entries, and C3 decides to store an entry with a lifespan.  C3 then crashes and is removed from the cluster.  The entry would never be purged in S (at least, until someone decides to access the entry from C1 or C2).  Right?

Cheers
Manik
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list