public function Esi::hasSurrogateEsiCapability

Checks that at least one surrogate has ESI/1.0 capability.

Parameters

Request $request A Request instance:

Return value

Boolean true if one surrogate has ESI/1.0 capability, false otherwise

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Esi.php, line 61

Class

Esi
Esi implements the ESI capabilities to Request and Response instances.

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

public function hasSurrogateEsiCapability(Request $request) {
  if (null === ($value = $request->headers
    ->get('Surrogate-Capability'))) {
    return false;
  }
  return false !== strpos($value, 'ESI/1.0');
}