function MemoryCounterBackend::increaseCounter
Same name in other branches
- 9 core/lib/Drupal/Core/Cache/MemoryCounterBackend.php \Drupal\Core\Cache\MemoryCounterBackend::increaseCounter()
- 8.9.x core/lib/Drupal/Core/Cache/MemoryCounterBackend.php \Drupal\Core\Cache\MemoryCounterBackend::increaseCounter()
- 10 core/lib/Drupal/Core/Cache/MemoryCounterBackend.php \Drupal\Core\Cache\MemoryCounterBackend::increaseCounter()
Increase the counter for a function with a certain cid.
Parameters
string $function: The called function.
string $cid: The cache ID of the cache entry to increase the counter.
3 calls to MemoryCounterBackend::increaseCounter()
- MemoryCounterBackend::delete in core/
lib/ Drupal/ Core/ Cache/ MemoryCounterBackend.php - Deletes an item from the cache.
- MemoryCounterBackend::get in core/
lib/ Drupal/ Core/ Cache/ MemoryCounterBackend.php - Returns data from the persistent cache.
- MemoryCounterBackend::set in core/
lib/ Drupal/ Core/ Cache/ MemoryCounterBackend.php - Stores data in the persistent cache.
File
-
core/
lib/ Drupal/ Core/ Cache/ MemoryCounterBackend.php, line 54
Class
- MemoryCounterBackend
- Defines a memory cache implementation that counts set and get calls.
Namespace
Drupal\Core\CacheCode
protected function increaseCounter($function, $cid) {
if (!isset($this->counter[$function][$cid])) {
$this->counter[$function][$cid] = 1;
}
else {
$this->counter[$function][$cid]++;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.