You are here

private function CachedReader::fetchFromCache 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::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 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Gets the annotations applied to a class.
CachedReader::getMethodAnnotations in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Gets the annotations applied to a method.
CachedReader::getPropertyAnnotations in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
Gets the annotations applied to a property.

File

vendor/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;
}