function CacheCollectorHelper::resolveCacheMiss

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php \Drupal\Tests\Core\Cache\CacheCollectorHelper::resolveCacheMiss()
  2. 10 core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php \Drupal\Tests\Core\Cache\CacheCollectorHelper::resolveCacheMiss()
  3. 11.x core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php \Drupal\Tests\Core\Cache\CacheCollectorHelper::resolveCacheMiss()

Overrides CacheCollector::resolveCacheMiss

File

core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php, line 36

Class

CacheCollectorHelper
Helper class to test the cache collector.

Namespace

Drupal\Tests\Core\Cache

Code

public function resolveCacheMiss($key) {
    $this->cacheMisses++;
    if (isset($this->cacheMissData[$key])) {
        $this->storage[$key] = $this->cacheMissData[$key];
        $this->persist($key);
        return $this->cacheMissData[$key];
    }
}

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