function FileParsingCacheCollectorBase::get
Same name and namespace in other branches
- main core/lib/Drupal/Core/Utility/FileParsingCacheCollectorBase.php \Drupal\Core\Utility\FileParsingCacheCollectorBase::get()
Overrides CacheCollector::get
File
-
core/
lib/ Drupal/ Core/ Utility/ FileParsingCacheCollectorBase.php, line 30
Class
- FileParsingCacheCollectorBase
- Caches file parsing in a cache collector.
Namespace
Drupal\Core\UtilityCode
public function get($key) : array {
$this->lazyLoadCache();
if (isset($this->storage[$key]) && file_exists($key)) {
if ($this->storage[$key]['mtime'] === filemtime($key)) {
return $this->storage[$key]['parsed'];
}
}
return $this->resolveCacheMiss($key);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.