if (null !==
$entry && \
in_array($response->
getStatusCode(),
[500, 502, 503, 504
]) && !
$entry->headers->
hasCacheControlDirective('no-cache'
) && !
$entry->
mustRevalidate() ) { if (null ===
$age =
$entry->headers->
getCacheControlDirective('stale-if-error'
)) { $age =
$this->options
['stale_if_error'
];
} /*
* stale-if-error gives the (extra) time that the Response may be used *after* it has become stale.
* So we compare the time the $entry has been sitting in the cache already with the
* time it was fresh plus the allowed grace period.
*/
if ($entry->
getAge() <=
$entry->
getMaxAge() +
$age) {