@@ -8,11 +8,11 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public $path; |
| 10 | 10 | public $opts = array( |
| 11 | - 'etag' => true, |
|
| 12 | - 'timeout' => 604800, |
|
| 13 | - 'maxAge' => 315360000, |
|
| 14 | - 'gzip' => false |
|
| 15 | - ); |
|
| 11 | + 'etag' => true, |
|
| 12 | + 'timeout' => 604800, |
|
| 13 | + 'maxAge' => 315360000, |
|
| 14 | + 'gzip' => false |
|
| 15 | + ); |
|
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | public function __construct($path = null, $opts = array()) |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->http_header(); |
| 80 | 80 | if ($this->opts['etag']) { |
| 81 | - header("Etag: " . md5($buffer)); |
|
| 81 | + header("Etag: ".md5($buffer)); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return $buffer; |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | private function http_header() |
| 88 | 88 | { |
| 89 | - header("Expires: ". gmdate('D, d M Y H:i:s', time() + $this->opts['timeout']) ." GMT"); |
|
| 90 | - header("Last-Modified: ". gmdate('D, d M Y H:i:s', time()) ." GMT"); |
|
| 91 | - header("Cache-Control: max-age=" . $this->opts['maxAge']); |
|
| 89 | + header("Expires: ".gmdate('D, d M Y H:i:s', time() + $this->opts['timeout'])." GMT"); |
|
| 90 | + header("Last-Modified: ".gmdate('D, d M Y H:i:s', time())." GMT"); |
|
| 91 | + header("Cache-Control: max-age=".$this->opts['maxAge']); |
|
| 92 | 92 | header("Pragma: cache"); |
| 93 | 93 | session_cache_limiter('public'); |
| 94 | 94 | } |