function PageCache::__construct

Same name and namespace in other branches
  1. 10 core/modules/page_cache/src/StackMiddleware/PageCache.php \Drupal\page_cache\StackMiddleware\PageCache::__construct()
  2. 11.x core/modules/page_cache/src/StackMiddleware/PageCache.php \Drupal\page_cache\StackMiddleware\PageCache::__construct()
  3. 9 core/modules/page_cache/src/StackMiddleware/PageCache.php \Drupal\page_cache\StackMiddleware\PageCache::__construct()
  4. 8.9.x core/modules/page_cache/src/StackMiddleware/PageCache.php \Drupal\page_cache\StackMiddleware\PageCache::__construct()

Constructs a PageCache object.

Parameters

\Closure $httpKernel: The decorated kernel.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache bin.

\Drupal\Core\PageCache\RequestPolicyInterface $requestPolicy: A policy rule determining the cacheability of a request.

\Drupal\Core\PageCache\ResponsePolicyInterface $responsePolicy: A policy rule determining the cacheability of the response.

File

core/modules/page_cache/src/StackMiddleware/PageCache.php, line 46

Class

PageCache
Executes the page caching before the main kernel takes over the request.

Namespace

Drupal\page_cache\StackMiddleware

Code

public function __construct(protected \Closure $httpKernel, protected CacheBackendInterface $cache, protected RequestPolicyInterface $requestPolicy, protected ResponsePolicyInterface $responsePolicy) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.