MemoryCounterBackend::increaseCounter

protected MemoryCounterBackend::increaseCounter($function, $cid)

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.

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\Cache

Code

protected function increaseCounter($function, $cid) {
  if (!isset($this->counter[$function][$cid])) {
    $this->counter[$function][$cid] = 1;
  }
  else {
    $this->counter[$function][$cid]++;
  }
}
doc_Drupal
2016-10-29 09:25:51
Comments
Leave a Comment

Please login to continue.