You are here

public function ApcuRawBackend::counterGetMultiple in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/ApcuRawBackend.php \Drupal\supercache\Cache\ApcuRawBackend::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/ApcuRawBackend.php, line 288
Contains \Drupal\supercache\Cache\ApcuRawBackend.

Class

ApcuRawBackend
Stores cache items in the Alternative PHP Cache User Cache (APCu).

Namespace

Drupal\supercache\Cache

Code

public function counterGetMultiple(array &$cids) {
  $results = $this
    ->getMultiple($cids);
  $counters = [];
  foreach ($results as $cid => $item) {
    $counters[$cid] = (int) $item->data;
  }
  return $counters;
}