[jboss-user] [JBoss Cache] New message: "Re: How to manage empty data with a CacheLoader?"

Nicolas Filotto do-not-reply at jboss.com
Wed Feb 10 10:49:40 EST 2010


User development,

A new message was posted in the thread "How to manage empty data with a CacheLoader?":

http://community.jboss.org/message/525478#525478

Author  : Nicolas Filotto
Profile : http://community.jboss.org/people/nfilotto

Message:
--------------------------------------------------------------
>> What you have here makes no sense.  CacheLoader.exists() and get() will +never+ be called if the node is in memory already.  Have a look at the CacheLoaderInterceptor for details
 
<< Yes, but CacheLoader.exists() and get() are always called when the data is missing into the local cache which is the case 90% of the time in my usecase that is why I did that
 
>> Like I said, what makes more sense is, *+if+ you never use eviction and can guarantee that what is in memory will never be out if sync with what is in the cache loader, then subclass the CLI and override the methods that load stuff from the cache loader.*
 
<< Yes, but I don't know which CacheLoader implementation will be used by the end-user i.e. FileCacheLoader, JDBCCacheLoader.. That is why I had to use a decorator instead in order to propose a solution that works with all the CacheLoader implementations.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/525478#525478




More information about the jboss-user mailing list