[jboss-user] [JBoss Cache: Core Edition] - Help configuring invalidation to work for me

smitchelus do-not-reply at jboss.com
Thu Apr 10 14:22:08 EDT 2008


Hi, I am trying to get JBoss Cache to work in a very specific way that I have used with another caching product in the past, but I've run into a road block that I just can't seem to get past. 

The setup I'd like to have is one where I have several JVM's (A, B, and C let's say) in contact with each other. Each essentially has his own independent cache, but when one of the items in the cache gets updated in the database we would send an eviction notice to all members of the cluster so that they would purge that item out of their local cache and re-read it from the database the next time it is requested.

I initially thought that the invalidation_async mode was what I needed. However, it turns out that an evict notification goes out to the other nodes as soon as one node puts the item into their cache. So what was happening to us was:
  * JVM A puts an item in it's cache
  * evict notification goes out to B and C
  * when the item is requested on JVM B it looks up the data from the db and adds it to it's local cache.
  * evict notification goes out to A and C
  * item requested on JVM A again but it has been invalidated so it looks it up from the db and puts it in the cache.
  * evict notice goes out to B and C again

So the cache just keeps getting invalidated again and again and the actual row in the database has never been updated!

Is there anyway to configure this basic setup in a way such that putting an item into the cache doesn't send the eviction notification?

Thanks,
Scott

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143281#4143281

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143281



More information about the jboss-user mailing list