[jbosscache-issues] [JBoss JIRA] Created: (JBCACHE-1439) CacheLoaderInterceptor calls both CacheLoader.exist() and get() for every load

Elias Ross (JIRA) jira-events at lists.jboss.org
Wed Nov 5 15:02:21 EST 2008


CacheLoaderInterceptor calls both CacheLoader.exist() and get() for every load
------------------------------------------------------------------------------

                 Key: JBCACHE-1439
                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1439
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 3.0.0.CR3
            Reporter: Elias Ross
            Assignee: Manik Surtani


Every Cache.get() operation where there is data in the cache loader calls both CacheLoader.exist() followed by CacheLoader.get().

A single Cache.get() operation would be sufficient. Since exist() is non-trivial, perhaps requiring a network call, performance is hurt doing this extra operation.

I believe earlier versions did not do this.

            if (n == null && loader.exists(fqn))
            {
               // just create a dummy node in memory
               n = helper.wrapNodeForWriting(ctx, fqn, true, true, true, false, false);
               n.setDataLoaded(false);
            }
            else
            {
               this.cacheMisses++;   
            }
            if (!bypassLoadingData && n != null)
            {
               n = loadNode(ctx, fqn, n);
            }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosscache-issues mailing list