Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | c2387f117808 |
line wrap: on
line diff
--- a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php Fri Feb 23 15:51:18 2018 +0000 +++ b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php Fri Feb 23 15:52:07 2018 +0000 @@ -39,7 +39,7 @@ */ public function add(Response $response) { - if ($response->isValidateable()) { + if (!$response->isFresh() || !$response->isCacheable()) { $this->cacheable = false; } else { $maxAge = $response->getMaxAge(); @@ -70,6 +70,9 @@ if ($response->isValidateable()) { $response->setEtag(null); $response->setLastModified(null); + } + + if (!$response->isFresh()) { $this->cacheable = false; }