public function ConfigCache::get

Loads and returns the value for the supplied cache key.

Parameters

string $resource A cache key:

Return value

mixed The cached value

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php, line 75

Class

ConfigCache
A config cache stores values using var_export() and include.

Namespace

Assetic\Cache

Code

public function get($resource) {
  $path = $this
    ->getSourcePath($resource);
  if (!file_exists($path)) {
    throw new \RuntimeException('There is no cached value for ' . $resource);
  }
  return include $path;
}