[
http://jira.jboss.com/jira/browse/JBCACHE-1120?page=comments#action_12367969 ]
Adrian Sandor commented on JBCACHE-1120:
----------------------------------------
I don't think that's what I reported. I actually had these two problems:
- AFTER I PUT A NODE IN THE CACHE, if I try to get the same node from the cache, it still
loads its data from the cacheloader
- after I load a node's children for the first time, if I try to get a child node from
the cache, it loads its data from the cacheloader, even if it had already loaded it
previously
Here's an example, with comments describing what the cacheloader is doing:
Cache c = DefaultCacheFactory.getInstance().createCache("replSync-service.xml",
true);
Map m = new HashMap();
m.put("foo", "bar");
Fqn ab = new Fqn("a", "b");
c.put(ab, m); //put /a/b, {foo=bar}
c.get(ab, "foo"); //get /a/b
c.get(ab, "foo"); //(nothing)
Node a = c.getRoot().getChild(new Fqn("a")); //get /a
a.getChildren(); //getchildrennames /a
c.get(ab, "foo"); //get /a/b
c.stop();
So it's loading the /a/b node twice, when normally it should never load it at all
(because I put it in the cache first)
Do not load data from loader for calls to Cache.get(Fqn fqn)
------------------------------------------------------------
Key: JBCACHE-1120
URL:
http://jira.jboss.com/jira/browse/JBCACHE-1120
Project: JBoss Cache
Issue Type: Task
Security Level: Public(Everyone can see)
Affects Versions: 2.0.0.CR2
Reporter: Elias Ross
Assigned To: Manik Surtani
Refer to the forum...
The following code causes the old data to be loaded from the cache loader, though
it's really not necessary:
Cache c;
Map m;
c.get("/a/b").replaceAll(m);
// or
c.get("/a/b").clearData();
Changing CacheLoaderInterceptor to not load on "getNodeMethodLocal_id" might
work, but not sure if that would be the correct fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira