public function isCacheable(): bool
{ if (!\
in_array($this->statusCode,
[200, 203, 300, 301, 302, 404, 410
])) { return false;
} if ($this->headers->
hasCacheControlDirective('no-store'
) ||
$this->headers->
getCacheControlDirective('private'
)) { return false;
} return $this->
isValidateable() ||
$this->
isFresh();
} /**
* Returns true if the response is "fresh".
*
* Fresh responses may be served from cache without any interaction with the
* origin. A response is considered fresh when it includes a Cache-Control/max-age
* indicator or Expires header and the calculated age is less than the freshness lifetime.
*
* @final
*/