if (null !==
$this->surrogate
) { $this->surrogateCacheStrategy =
$this->surrogate->
createCacheStrategy();
} } $this->traces
[$this->
getTraceKey($request)] =
[];
if (!
$request->
isMethodSafe()) { $response =
$this->
invalidate($request,
$catch);
} elseif ($request->headers->
has('expect'
) || !
$request->
isMethodCacheable()) { $response =
$this->
pass($request,
$catch);
} elseif ($this->options
['allow_reload'
] &&
$request->
isNoCache()) { /*
If allow_reload is configured and the client requests "Cache-Control: no-cache",
reload the cache by fetching a fresh response and caching it (if possible).
*/
$this->
record($request, 'reload'
);
$response =
$this->
fetch($request,
$catch);
} else { $response =
$this->
lookup($request,
$catch);
} $this->
restoreResponseBody($request,
$response);