diff FileCacheSet.inc @ 116:374e3eff07fd

Branch merge
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 17 Mar 2016 22:34:49 +0100
parents adf7b11921f4
children
line wrap: on
line diff
--- a/FileCacheSet.inc	Thu Mar 17 22:32:33 2016 +0100
+++ b/FileCacheSet.inc	Thu Mar 17 22:34:49 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");
+    }
   }
 
 };