Checks that the Response needs to be parsed for ESI tags.
Response $response A Response instance:
Boolean true if the Response needs to be parsed, false otherwise
public function needsEsiParsing(Response $response) {
if (!($control = $response->headers
->get('Surrogate-Control'))) {
return false;
}
return (bool) preg_match('#content="[^"]*ESI/1.0[^"]*"#', $control);
}