EarlyRenderingControllerWrapperSubscriber::$renderer

The renderer. Type: \Drupal\Core\Render\RendererInterface File core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php, line 69 Class EarlyRenderingControllerWrapperSubscriber Subscriber that wraps controllers, to handle early rendering. Namespace Drupal\Core\EventSubscriber Code protected $renderer;

EarlyRenderingControllerWrapperSubscriber::$controllerResolver

The controller resolver. Type: \Drupal\Core\Controller\ControllerResolverInterface File core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php, line 62 Class EarlyRenderingControllerWrapperSubscriber Subscriber that wraps controllers, to handle early rendering. Namespace Drupal\Core\EventSubscriber Code protected $controllerResolver;

EarlyRenderingControllerWrapperSubscriber

Subscriber that wraps controllers, to handle early rendering. When controllers call drupal_render() (RendererInterface::render()) outside of a render context, we call that "early rendering". Controllers should return only render arrays, but we cannot prevent controllers from doing early rendering. The problem with early rendering is that the bubbleable metadata (cacheability & attachments) are lost. This can lead to broken pages (missing assets), stale pages (missing cache tags causing a pa

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. \

DynamicPageCacheSubscriber::shouldCacheResponse

protected DynamicPageCacheSubscriber::shouldCacheResponse(CacheableResponseInterface $response) Whether the given response should be cached by Dynamic Page Cache. We consider any response that has cacheability metadata meeting the auto- placeholdering conditions to be uncacheable. Because those conditions indicate poor cacheability, and if it doesn't make sense to cache parts of a page, then neither does it make sense to cache an entire page. But note that auto-placeholdering avoids such cachea

DynamicPageCacheSubscriber::responseToRenderArray

protected DynamicPageCacheSubscriber::responseToRenderArray(CacheableResponseInterface $response) Embeds a Response object in a render array so that RenderCache can cache it. @todo Refactor/remove once https://www.drupal.org/node/2551419 lands. Parameters \Drupal\Core\Cache\CacheableResponseInterface $response: A cacheable response. Return value array A render array that embeds the given cacheable response object, with the cacheability metadata of the response object present in the #cache pro

DynamicPageCacheSubscriber::renderArrayToResponse

protected DynamicPageCacheSubscriber::renderArrayToResponse(array $render_array) Gets the embedded Response object in a render array. Parameters array $render_array: A render array with a #response property. Return value \Drupal\Core\Cache\CacheableResponseInterface The cacheable response object. See also responseToRenderArray() File core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php, line 300 Class DynamicPageCacheSubscriber Returns cached responses as e

DynamicPageCacheSubscriber::onRouteMatch

public DynamicPageCacheSubscriber::onRouteMatch(GetResponseEvent $event) Sets a response in case of a Dynamic Page Cache hit. Parameters \Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The event to process. File core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php, line 125 Class DynamicPageCacheSubscriber Returns cached responses as early and avoiding as much work as possible. Namespace Drupal\dynamic_page_cache\EventSubscriber Code public f

DynamicPageCacheSubscriber::onResponse

public DynamicPageCacheSubscriber::onResponse(FilterResponseEvent $event) Stores a response in case of a Dynamic Page Cache miss, if cacheable. Parameters \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event: The event to process. File core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php, line 151 Class DynamicPageCacheSubscriber Returns cached responses as early and avoiding as much work as possible. Namespace Drupal\dynamic_page_cache\EventSubs

DynamicPageCacheSubscriber::HEADER

Name of Dynamic Page Cache's response header. File core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php, line 40 Class DynamicPageCacheSubscriber Returns cached responses as early and avoiding as much work as possible. Namespace Drupal\dynamic_page_cache\EventSubscriber Code const HEADER = 'X-Drupal-Dynamic-Cache';