function ChainedStorageExpirable::setMultipleWithExpire in Supercache 8
Same name and namespace in other branches
- 2.0.x src/KeyValueStore/ChainedStorageExpirable.php \Drupal\supercache\KeyValueStore\ChainedStorageExpirable::setMultipleWithExpire()
Saves an array of values with a time to live.
Parameters
array $data: An array of data to store.
int $expire: The time to live for items, in seconds.
Overrides DatabaseStorageExpirable::setMultipleWithExpire
File
- src/
KeyValueStore/ ChainedStorageExpirable.php, line 143 - Contains \Drupal\supercache\KeyValueStore\ChainedStorageExpirable.
Class
- ChainedStorageExpirable
- Defines a default key/value store implementation for expiring items.
Namespace
Drupal\supercache\KeyValueStoreCode
function setMultipleWithExpire(array $data, $expire) {
foreach ($data as $key => $value) {
$this
->setWithExpire($key, $value, $expire);
}
}