You are here

public function ChainedFastRawBackend::counterMultiple in Supercache 8

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

Class

ChainedFastRawBackend
Defines a backend with a fast and a consistent backend chain.

Namespace

Drupal\supercache\Cache

Code

public function counterMultiple(array $cids, $increment, $default = 0) {
  $this->consistentBackend
    ->counterMultiple($cids, $increment, $default);
  $this->fastBackend
    ->counterMultiple($cids, $increment, $default);
  $this
    ->markAsOutdated();
}