You are here

public function ApcuRawBackend::counterMultiple in Supercache 2.0.x

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

Add an increment (can be negative) to the stored cache data. Only works for stored numeric data.

Parameters

string[] $cide: The cache ID or array of ID's.

int $increment: The amount to increment or decrement.

int $default: Default value.

Overrides CacheRawBackendInterface::counterMultiple

File

src/Cache/ApcuRawBackend.php, line 252
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 counterMultiple(array $cids, $increment, $default = 0) {
  foreach ($cids as $cid) {
    $this
      ->counter($cid, $increment, $default);
  }
}