DynamicPageCacheSubscriber::__construct

public DynamicPageCacheSubscriber::__construct(RequestPolicyInterface $request_policy, ResponsePolicyInterface $response_policy, RenderCacheInterface $render_cache, array $renderer_config)

Constructs a new DynamicPageCacheSubscriber object.

Parameters

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

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

\Drupal\Core\Render\RenderCacheInterface $render_cache: The render cache.

array $renderer_config: The renderer configuration array.

File

core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php, line 111

Class

DynamicPageCacheSubscriber
Returns cached responses as early and avoiding as much work as possible.

Namespace

Drupal\dynamic_page_cache\EventSubscriber

Code

public function __construct(RequestPolicyInterface $request_policy, ResponsePolicyInterface $response_policy, RenderCacheInterface $render_cache, array $renderer_config) {
  $this->requestPolicy = $request_policy;
  $this->responsePolicy = $response_policy;
  $this->renderCache = $render_cache;
  $this->rendererConfig = $renderer_config;
  $this->requestPolicyResults = new \SplObjectStorage();
}
doc_Drupal
2016-10-29 09:03:28
Comments
Leave a Comment

Please login to continue.