diff FileCacheSet.inc @ 111:adf7b11921f4

No compression when debugging. Synchronize caching headers.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Tue, 15 Mar 2016 12:55:42 +0100
parents 23a59da90fc7
children
line wrap: on
line diff
--- a/FileCacheSet.inc	Tue Mar 08 00:43:48 2016 +0100
+++ b/FileCacheSet.inc	Tue Mar 15 12:55:42 2016 +0100
@@ -13,7 +13,12 @@
   }
 
   function cacheControl() {
-    return array("expires" => toGMTime(time()+$this->max_age), "cache-control" => "public, max-age=$this->max_age");
+    if ($this->max_age > 0) {
+      return array("expires" => toGMTime(time()+$this->max_age), "cache-control" => "public, max-age=$this->max_age");
+    }
+    else {
+      return array("expires" => 0, "cache-control" => "public, max-age=0, no-cache");
+    }
   }
 
 };