You are here

private function CachedReader::isCacheFresh in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/lib/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 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Fetches a value from the cache.

File

modules/providers/service_container_annotation_discovery/lib/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);
}