Merge pull request #178 from sethbattin/cacheheaderfix

include pragma='no-cache' in the cache header reset
pull/181/head
Mike Cao 10 years ago
commit dd096acff3

@ -190,6 +190,9 @@ class Response {
$expires = is_int($expires) ? $expires : strtotime($expires);
$this->headers['Expires'] = gmdate('D, d M Y H:i:s', $expires) . ' GMT';
$this->headers['Cache-Control'] = 'max-age='.($expires - time());
if (isset($this->headers['Pragma']) && $this->headers['Pragma'] == 'no-cache'){
unset($this->headers['Pragma']);
}
}
return $this;
}

Loading…
Cancel
Save