comparison 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
comparison
equal deleted inserted replaced
115:b9668126e52e 116:374e3eff07fd
11 { 11 {
12 $this->max_age=$seconds; 12 $this->max_age=$seconds;
13 } 13 }
14 14
15 function cacheControl() { 15 function cacheControl() {
16 return array("expires" => toGMTime(time()+$this->max_age), "cache-control" => "public, max-age=$this->max_age"); 16 if ($this->max_age > 0) {
17 return array("expires" => toGMTime(time()+$this->max_age), "cache-control" => "public, max-age=$this->max_age");
18 }
19 else {
20 return array("expires" => 0, "cache-control" => "public, max-age=0, no-cache");
21 }
17 } 22 }
18 23
19 }; 24 };
20 25
21 /** 26 /**