Proxy server could cache http response when it is not private
Signed-off-by: Clement Wong <git@clement.hk>
This commit is contained in:
parent
c19d639231
commit
1331eb1fb8
|
@ -107,10 +107,10 @@ class Response {
|
|||
*/
|
||||
public function cacheFor(int $cacheSeconds) {
|
||||
if ($cacheSeconds > 0) {
|
||||
$this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds . ', must-revalidate');
|
||||
$this->addHeader('Cache-Control', 'private, max-age=' . $cacheSeconds . ', must-revalidate');
|
||||
|
||||
// Old scool prama caching
|
||||
$this->addHeader('Pragma', 'public');
|
||||
$this->addHeader('Pragma', 'private');
|
||||
|
||||
// Set expires header
|
||||
$expires = new \DateTime();
|
||||
|
|
Loading…
Reference in New Issue