public function ChainedFastRawBackend::counter in Supercache 8
Same name and namespace in other branches
- 2.0.x src/Cache/ChainedFastRawBackend.php \Drupal\supercache\Cache\ChainedFastRawBackend::counter()
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::counter
File
- src/
Cache/ ChainedFastRawBackend.php, line 248 - Contains \Drupal\supercache\Cache\ChainedFastRawBackend.
Class
- ChainedFastRawBackend
- Defines a backend with a fast and a consistent backend chain.
Namespace
Drupal\supercache\CacheCode
public function counter($cid, $increment, $default = 0) {
$this->consistentBackend
->counter($cid, $increment, $default);
$this->fastBackend
->counterSet($cid, $increment, $default);
$this
->markAsOutdated();
}