You are here

private function CachedReader::fetchFromCache 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::fetchFromCache()

Fetches a value from the cache.

Parameters

string $rawCacheKey The cache key.:

\ReflectionClass $class The related class.:

Return value

mixed The cached value or false when the value is not in cache.

3 calls to CachedReader::fetchFromCache()
CachedReader::getClassAnnotations in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Gets the annotations applied to a class.
CachedReader::getMethodAnnotations in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Gets the annotations applied to a method.
CachedReader::getPropertyAnnotations in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Gets the annotations applied to a property.

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php, line 190

Class

CachedReader
A cache aware annotation reader.

Namespace

Doctrine\Common\Annotations

Code

private function fetchFromCache($rawCacheKey, \ReflectionClass $class) {
  $cacheKey = $rawCacheKey . self::$CACHE_SALT;
  if (($data = $this->cache
    ->fetch($cacheKey)) !== false) {
    if (!$this->debug || $this
      ->isCacheFresh($cacheKey, $class)) {
      return $data;
    }
  }
  return false;
}