Howdy all! background: In our db we have a rather large table (>500k entries). Said table is growing over time but not all entries are live. We are aware of this so we prune the table about once a week. The only live entries that we are sure of at run-time are those that are actually requested by the client systems. What I want to do is to cache only the requested entries. I do not want to lift the entire table into the cache.
I therefore implemented a rudimentary cache loader and when my test app calls get(Fqn,Key) I expected the CacheLoader.get(Fqn,Key) to called. Instead get(Fqn) is called. I return an empty hash map since I can't tell what actual entry that is reqeusted. The actual call sequence seems to be: TreeCache.get(Fqn,Key) CacheLoader.exists(Fqn) (I return true) CacheLoader.get(Fqn) (return an empty hash map) And then TreeCache.get(Fqn,Key) returns null. I've been fippling with the various options in the config file to no avail and now I'm at my wits end. I'm grateful for any help. cheers Erik The relevant entries in the config file: false false false com.ongame.naps.cache.NapsCacheLoader My code: public class Cache { public Cache(){ . . . fCache = new TreeCache(); PropertyConfigurator pc = new PropertyConfigurator(); pc.configure(fCache,conf_file); // the cache loader is set in the config file fCache.setFetchStateOnStartup(false); fCache.create(); fCache.startService(); . . } public Entry get(Fqn domain,long key){ . . Entry entry = fCache.get(domain, new Long(key)); . } } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3856057#3856057 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3856057 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development