protected property PlaceholderingRenderCache::$placeholderResultsCache
Stores rendered results for automatically placeholdered elements.
This allows us to avoid talking to the cache twice per auto-placeholdered element, or in case of an uncacheable element, to render it twice.
Scenario A. The double cache read would happen because: 1. when rendering, cache read, but auto-placeholdered 2. when rendering placeholders, again cache read
Scenario B. The cache write plus read would happen because: 1. when rendering, cache write, but auto-placeholdered 2. when rendering placeholders, cache read
Scenario C. The double rendering for an uncacheable element would happen because: 1. when rendering, not cacheable, but auto-placeholdered 2. when rendering placeholders, rendered again
In all three scenarios, this static cache avoids the second step, thus avoiding expensive work.
Type: array
File
- core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php, line 72
Class
- PlaceholderingRenderCache
- Adds automatic placeholdering to the RenderCache.
Namespace
Drupal\Core\RenderCode
protected $placeholderResultsCache = [];
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!PlaceholderingRenderCache.php/property/PlaceholderingRenderCache::placeholderResultsCache/8.1.x