You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/09/14 17:57:27 UTC
svn commit: r1523272 -
/tomcat/trunk/java/org/apache/catalina/webresources/Cache.java
Author: markt
Date: Sat Sep 14 15:57:26 2013
New Revision: 1523272
URL: http://svn.apache.org/r1523272
Log:
Fix bytes / kilobytes mismatch that resulted in fewer objects being
cached.
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=1523272&r1=1523271&r2=1523272&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/Cache.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/Cache.java Sat Sep 14 15:57:26 2013
@@ -76,7 +76,7 @@ public class Cache {
// newCacheEntry was inserted into the cache - validate it
cacheEntry = newCacheEntry;
cacheEntry.validate();
- if (newCacheEntry.getContentLength() > getMaxObjectSize()) {
+ if (newCacheEntry.getContentLength() > getMaxSizeBytes()) {
// Cache size has not been updated at this point
removeCacheEntry(path, false);
return newCacheEntry;
@@ -184,6 +184,11 @@ public class Cache {
return maxSize / 1024;
}
+ public long getMaxSizeBytes() {
+ // Internally bytes, externally kilobytes
+ return maxSize;
+ }
+
public void setMaxSize(long maxSize) {
// Internally bytes, externally kilobytes
this.maxSize = maxSize * 1024;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org