protected function ChainedStorageTrait::populateMissingValuesLocal in Supercache 2.0.x
Same name and namespace in other branches
- 8 src/KeyValueStore/ChainedStorageTrait.php \Drupal\supercache\KeyValueStore\ChainedStorageTrait::populateMissingValuesLocal()
To prevent database lookups we store a special 'empty' object.
Parameters
array $requested: The requested set of keys from getMultiple().
array $obtained: The effectively obtained key-value pairs.
2 calls to ChainedStorageTrait::populateMissingValuesLocal()
- ChainedStorage::getMultiple in src/
KeyValueStore/ ChainedStorage.php - Returns the stored key/value pairs for a given set of keys.
- ChainedStorageExpirable::getMultiple in src/
KeyValueStore/ ChainedStorageExpirable.php - Returns the stored key/value pairs for a given set of keys.
File
- src/
KeyValueStore/ ChainedStorageTrait.php, line 47
Class
Namespace
Drupal\supercache\KeyValueStoreCode
protected function populateMissingValuesLocal($requested, $obtained) {
$missing = array_diff_key(array_flip($requested), $obtained);
foreach ($missing as $key => $value) {
$missing[$key] = $this->EMPTY_VALUE;
}
$this->cache
->setMultiple($this
->KeyValueToCache($missing));
}