You are here

public function PhpBackend::setMultiple in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Cache/PhpBackend.php \Drupal\Core\Cache\PhpBackend::setMultiple()
  2. 9 core/lib/Drupal/Core/Cache/PhpBackend.php \Drupal\Core\Cache\PhpBackend::setMultiple()

File

core/lib/Drupal/Core/Cache/PhpBackend.php, line 85

Class

PhpBackend
Defines a PHP cache implementation.

Namespace

Drupal\Core\Cache

Code

public function setMultiple(array $items) {
  foreach ($items as $cid => $item) {
    $this
      ->set($cid, $item['data'], $item['expire'] ?? CacheBackendInterface::CACHE_PERMANENT, $item['tags'] ?? []);
  }
}