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
0eeb660679
commit
401210d259
|
@ -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