public function ChainedFastRawBackend::counterSet in Supercache 8
Same name and namespace in other branches
- 2.0.x src/Cache/ChainedFastRawBackend.php \Drupal\supercache\Cache\ChainedFastRawBackend::counterSet()
Set the value for a counter storage item.
On some backends you can actually simply call set() but others require to provide, for example, an ASCII representation of the value.
Parameters
string $cid: The cache id.
int $value: The value.
Overrides CacheRawBackendInterface::counterSet
File
- src/
Cache/ ChainedFastRawBackend.php, line 267 - Contains \Drupal\supercache\Cache\ChainedFastRawBackend.
Class
- ChainedFastRawBackend
- Defines a backend with a fast and a consistent backend chain.
Namespace
Drupal\supercache\CacheCode
public function counterSet($cid, $value) {
$this->consistentBackend
->set($cid, $value);
$this->fastBackend
->set($cid, $value);
$this
->markAsOutdated();
}