function CacheDataCollector::registerCacheMiss
Registers a cache get on a specific cache bin.
Parameters
$bin:
$cid:
File
-
webprofiler/
src/ DataCollector/ CacheDataCollector.php, line 61
Class
- CacheDataCollector
- Collects the used cache bins and cache CIDs.
Namespace
Drupal\webprofiler\DataCollectorCode
public function registerCacheMiss($bin, $cid) {
$current = isset($this->data['cache'][$bin][$cid]) ? $this->data['cache'][$bin][$cid] : NULL;
if (!$current) {
$current = new \StdClass();
$current->{CacheDataCollector::WEBPROFILER_CACHE_HIT} = 0;
$current->{CacheDataCollector::WEBPROFILER_CACHE_MISS} = 0;
$this->data['cache'][$bin][$cid] = $current;
}
$current->{CacheDataCollector::WEBPROFILER_CACHE_MISS}++;
$this->data['total'][CacheDataCollector::WEBPROFILER_CACHE_MISS]++;
}