function MemoryCounterBackend::set

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/MemoryCounterBackend.php \Drupal\Core\Cache\MemoryCounterBackend::set()
  2. 8.9.x core/lib/Drupal/Core/Cache/MemoryCounterBackend.php \Drupal\Core\Cache\MemoryCounterBackend::set()
  3. 10 core/lib/Drupal/Core/Cache/MemoryCounterBackend.php \Drupal\Core\Cache\MemoryCounterBackend::set()

Overrides MemoryBackend::set

File

core/lib/Drupal/Core/Cache/MemoryCounterBackend.php, line 33

Class

MemoryCounterBackend
Defines a memory cache implementation that counts set and get calls.

Namespace

Drupal\Core\Cache

Code

public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = []) {
    $this->increaseCounter(__FUNCTION__, $cid);
    parent::set($cid, $data, $expire, $tags);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.