You are here

public function DatabaseRawBackend::counterSetMultiple in Supercache 2.0.x

Same name and namespace in other branches
  1. 8 src/Cache/DatabaseRawBackend.php \Drupal\supercache\Cache\DatabaseRawBackend::counterSetMultiple()

Set the value of counter variables in batch.

Parameters

array $items: An array of counter values, keyed by cid. In the form:

$items = array(
  $cid => $value,
);

Overrides CacheRawBackendInterface::counterSetMultiple

File

src/Cache/DatabaseRawBackend.php, line 435
Contains \Drupal\supercache\Cache\DatabaseRawBackend.

Class

DatabaseRawBackend
Defines a default cache implementation.

Namespace

Drupal\supercache\Cache

Code

public function counterSetMultiple(array $items) {
  foreach ($items as $cid => $item) {
    $this
      ->counterSet($cid, (int) $item);
  }
}