You are here

private function PhpFileCache::includeFileForId in Plug 7

Parameters

string $id:

Return value

array|false

2 calls to PhpFileCache::includeFileForId()
PhpFileCache::doContains in lib/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php
Tests if an entry exists in the cache.
PhpFileCache::doFetch in lib/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php
Fetches an entry from the cache.

File

lib/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php, line 107

Class

PhpFileCache
Php file cache driver.

Namespace

Doctrine\Common\Cache

Code

private function includeFileForId($id) {
  $fileName = $this
    ->getFilename($id);

  // note: error suppression is still faster than `file_exists`, `is_file` and `is_readable`
  $value = @(include $fileName);
  if (!isset($value['lifetime'])) {
    return false;
  }
  return $value;
}