tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1669451 - /tomcat/trunk/java/org/apache/catalina/webresources/Cache.java
Date Thu, 26 Mar 2015 21:48:01 GMT
Author: markt
Date: Thu Mar 26 21:48:00 2015
New Revision: 1669451

URL: http://svn.apache.org/r1669451
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57752
Exclude non-cached resources from Cache statistics.
Patch by Adam Mlodzinski

Modified:
    tomcat/trunk/java/org/apache/catalina/webresources/Cache.java

Modified: tomcat/trunk/java/org/apache/catalina/webresources/Cache.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/Cache.java?rev=1669451&r1=1669450&r2=1669451&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/Cache.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/Cache.java Thu Mar 26 21:48:00 2015
@@ -59,12 +59,12 @@ public class Cache {
 
     protected WebResource getResource(String path, boolean useClassLoaderResources) {
 
-        lookupCount.incrementAndGet();
-
         if (noCache(path)) {
             return root.getResourceInternal(path, useClassLoaderResources);
         }
 
+        lookupCount.incrementAndGet();
+
         CachedResource cacheEntry = resourceCache.get(path);
 
         if (cacheEntry != null && !cacheEntry.validateResource(useClassLoaderResources))
{



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message