[jboss-user] [JBoss Cache Users] - Re: Invalidation-only cache
manik.surtani@jboss.com
do-not-reply at jboss.com
Wed Sep 23 12:55:52 EDT 2009
I think you are using the cache loader in an incorrect way. CLs are designed to be a persistent (and overflow) extension to memory and should never be sued to store a different form of data. And should also never change externally outside the cache system.
If you want to cache stuff from a data source which contains a different form of data, or that can be updated externally, I recommend looking at how Hibernate implements a 2nd level cache as this pattern is similar. Basically your code would look up the cache. If it is not in the cache, look in the data store, retrieve and cache before returning. And periodically (or based on some other trigger) invalidate what's in the cache.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256708#4256708
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256708
More information about the jboss-user
mailing list