Das Caching darf erst für cache-seconds < 0 vollständig unterdrückt werden
[percentcodec] / cachecontrol / src / main / java / de / halbekunst / juplo / cachecontrol / CacheControl.java
index bf49a45..c3e7c99 100644 (file)
@@ -120,7 +120,7 @@ public class CacheControl {
     }
 
     int cacheSeconds = handle.getCacheSeconds(request);
-    if (cacheSeconds < 1) {
+    if (cacheSeconds < 0) {
       log.debug("{}: caching disabled!", url);
       response.setDateHeader(Headers.HEADER_DATE, handle.getTimestamp());
       response.setDateHeader(Headers.HEADER_EXPIRES, 0);
@@ -328,7 +328,6 @@ public class CacheControl {
 
       cacheSeconds = CacheControl.this.defaultCacheSeconds;
       lastModified = CacheControl.this.defaultLastModified;
-      eTag = "";
 
       /** Class-Level-Annotations auslesen */
       for (Annotation annotation : handler.getClass().getAnnotations()) {