You are here

public function ApcuBackend::setMultiple in Drupal 10

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

File

core/lib/Drupal/Core/Cache/ApcuBackend.php, line 185

Class

ApcuBackend
Stores cache items in the Alternative PHP Cache User Cache (APCu).

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'] ?? []);
  }
}