public function FilesystemCache::get

Returns the value for a key.

Parameters

string $key A unique key:

Return value

string|null The value in the cache

Overrides CacheInterface::get

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php, line 33

Class

FilesystemCache
A simple filesystem cache.

Namespace

Assetic\Cache

Code

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