public function DatabaseRawBackend::counterGetMultiple in Supercache 2.0.x
Same name and namespace in other branches
- 8 src/Cache/DatabaseRawBackend.php \Drupal\supercache\Cache\DatabaseRawBackend::counterGetMultiple()
Get multiple counter values at once.
Parameters
array $cids: An array of cache id's to retrieve.
Overrides CacheRawBackendInterface::counterGetMultiple
See also
self::getCounter()
File
- src/
Cache/ DatabaseRawBackend.php, line 454 - Contains \Drupal\supercache\Cache\DatabaseRawBackend.
Class
- DatabaseRawBackend
- Defines a default cache implementation.
Namespace
Drupal\supercache\CacheCode
public function counterGetMultiple(array &$cids) {
$results = $this
->getMultiple($cids);
$counters = [];
foreach ($results as $cid => $item) {
$counters[$cid] = (int) $item->data;
}
return $counters;
}