RenderCacheInterface::set

public RenderCacheInterface::set(array &$elements, array $pre_bubbling_elements) Caches the rendered output of a renderable array. May be called by an implementation of \Drupal\Core\Render\RendererInterface while rendering, if the #cache property is set. Parameters array $elements: A renderable array. array $pre_bubbling_elements: A renderable array corresponding to the state (in particular, the cacheability metadata) of $elements prior to the beginning of its rendering process, and theref

RenderCacheInterface::getCacheableRenderArray

public RenderCacheInterface::getCacheableRenderArray(array $elements) Gets a cacheable render array for a render array and its rendered output. Given a render array and its rendered output (HTML string), return an array data structure that allows the render array and its associated metadata to be cached reliably (and is serialization-safe). If Drupal needs additional rendering metadata to be cached at some point, consumers of this method will continue to work. Those who only cache certain parts

RenderCacheInterface::get

public RenderCacheInterface::get(array $elements) Gets the cached, pre-rendered element of a renderable element from cache. Parameters array $elements: A renderable array. Return value array|false A renderable array, with the original element and all its children pre- rendered, or FALSE if no cached copy of the element is available. See also \Drupal\Core\Render\RendererInterface::render() ::set() File core/lib/Drupal/Core/Render/RenderCacheInterface.php, line 48 Class RenderCacheInterfac

RenderCacheInterface

Defines an interface for caching rendered render arrays. @internal Hierarchy interface \Drupal\Core\Render\RenderCacheInterface See also sec_caching \Drupal\Core\Render\RendererInterface File core/lib/Drupal/Core/Render/RenderCacheInterface.php, line 13 Namespace Drupal\Core\Render Members Name Modifiers Type Description RenderCacheInterface::get public function Gets the cached, pre-rendered element of a renderable element from cache. RenderCacheInterface::getCacheabl

RenderCache::__construct

public RenderCache::__construct(RequestStack $request_stack, CacheFactoryInterface $cache_factory, CacheContextsManager $cache_contexts_manager) Constructs a new RenderCache object. Parameters \Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack. \Drupal\Core\Cache\CacheFactoryInterface $cache_factory: The cache factory. \Drupal\Core\Cache\Context\CacheContextsManager $cache_contexts_manager: The cache contexts manager. File core/lib/Drupal/Core/Render/RenderCache.p

RenderCache::set

public RenderCache::set(array &$elements, array $pre_bubbling_elements) Caches the rendered output of a renderable array. May be called by an implementation of \Drupal\Core\Render\RendererInterface while rendering, if the #cache property is set. Parameters array $elements: A renderable array. array $pre_bubbling_elements: A renderable array corresponding to the state (in particular, the cacheability metadata) of $elements prior to the beginning of its rendering process, and therefore befor

RenderCache::maxAgeToExpire

protected RenderCache::maxAgeToExpire($max_age) Maps a #cache[max-age] value to an "expire" value for the Cache API. Parameters int $max_age: A #cache[max-age] value. Return value int A corresponding "expire" value. See also \Drupal\Core\Cache\CacheBackendInterface::set() File core/lib/Drupal/Core/Render/RenderCache.php, line 283 Class RenderCache Wraps the caching logic for the render caching system. Namespace Drupal\Core\Render Code protected function maxAgeToExpire($max_age) {

RenderCache::getCacheableRenderArray

public RenderCache::getCacheableRenderArray(array $elements) Gets a cacheable render array for a render array and its rendered output. Given a render array and its rendered output (HTML string), return an array data structure that allows the render array and its associated metadata to be cached reliably (and is serialization-safe). If Drupal needs additional rendering metadata to be cached at some point, consumers of this method will continue to work. Those who only cache certain parts of a ren

RenderCache::get

public RenderCache::get(array $elements) Gets the cached, pre-rendered element of a renderable element from cache. Parameters array $elements: A renderable array. Return value array|false A renderable array, with the original element and all its children pre- rendered, or FALSE if no cached copy of the element is available. Overrides RenderCacheInterface::get See also \Drupal\Core\Render\RendererInterface::render() ::set() File core/lib/Drupal/Core/Render/RenderCache.php, line 61 Class R

RenderCache::createCacheID

protected RenderCache::createCacheID(array &$elements) Creates the cache ID for a renderable element. Creates the cache ID string based on #cache['keys'] + #cache['contexts']. Parameters array &$elements: A renderable array. Return value string The cache ID string, or FALSE if the element may not be cached. File core/lib/Drupal/Core/Render/RenderCache.php, line 298 Class RenderCache Wraps the caching logic for the render caching system. Namespace Drupal\Core\Render Code prote