You are here

private function CachedReader::isCacheFresh in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php \Doctrine\Common\Annotations\CachedReader::isCacheFresh()

Checks if the cache is fresh.

Parameters

string $cacheKey:

\ReflectionClass $class:

Return value

boolean

1 call to CachedReader::isCacheFresh()
CachedReader::fetchFromCache in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Fetches a value from the cache.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php, line 227

Class

CachedReader
A cache aware annotation reader.

Namespace

Doctrine\Common\Annotations

Code

private function isCacheFresh($cacheKey, \ReflectionClass $class) {
  if (false === ($filename = $class
    ->getFilename())) {
    return true;
  }
  return $this->cache
    ->fetch('[C]' . $cacheKey) >= filemtime($filename);
}