You are here

public function RenderCacheBackendAdapter::setMultiple in Render cache 7.2

This sets multiple cache entries based on the cache info map.

It is expected that $build and $cache_info_map are keyed by the same IDs.

Parameters

array &$build: The build of render arrays, keyed by ID.

array $cache_info_map: The cache information map, keyed by ID, consisting of cache info structs.

Overrides RenderCacheBackendAdapterInterface::setMultiple

File

src/Cache/RenderCacheBackendAdapter.php, line 193
Contains \Drupal\render_cache\Cache\RenderCacheBackendAdapter

Class

RenderCacheBackendAdapter
Defines the render_cache.cache service.

Namespace

Drupal\render_cache\Cache

Code

public function setMultiple(array &$build, array $cache_info_map) {
  foreach (Element::children($build) as $id) {
    $this
      ->set($build[$id], $cache_info_map[$id]);
  }
}