You are here

public function ChainedFastRawBackend::setMultiple in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/ChainedFastRawBackend.php \Drupal\supercache\Cache\ChainedFastRawBackend::setMultiple()

Store multiple items in the persistent cache.

Parameters

array $items: An array of cache items, keyed by cid. In the form:

$items = array(
  $cid => array(
    // Required.
    'data' => $data,
    // Optional, defaults to CacheRawBackendInterface::CACHE_PERMANENT.
    'expire' => CacheRawBackendInterface::CACHE_PERMANENT,
  ),
);

Overrides CacheRawBackendInterface::setMultiple

File

src/Cache/ChainedFastRawBackend.php, line 186
Contains \Drupal\supercache\Cache\ChainedFastRawBackend.

Class

ChainedFastRawBackend
Defines a backend with a fast and a consistent backend chain.

Namespace

Drupal\supercache\Cache

Code

public function setMultiple(array $items) {
  if (empty($items)) {
    return;
  }
  $this->consistentBackend
    ->setMultiple($items);
  $this->fastBackend
    ->setMultiple($items);
  $this
    ->markAsOutdated();
}