public function ApcuRawBackend::setMultiple in Supercache 2.0.x
Same name and namespace in other branches
- 8 src/Cache/ApcuRawBackend.php \Drupal\supercache\Cache\ApcuRawBackend::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/ ApcuRawBackend.php, line 193 - Contains \Drupal\supercache\Cache\ApcuRawBackend.
Class
- ApcuRawBackend
- Stores cache items in the Alternative PHP Cache User Cache (APCu).
Namespace
Drupal\supercache\CacheCode
public function setMultiple(array $items = array()) {
foreach ($items as $cid => $item) {
$this
->set($cid, $item['data'], isset($item['expire']) ? $item['expire'] : CacheRawBackendInterface::CACHE_PERMANENT);
}
}