Salva um valor do cache

@uses Cache::generateFileLocation() para gerar o local do arquivo de cache

@param string $key Uma chave para identificar o valor cacheado

@return mixed Se o cache foi encontrado retorna o seu valor, caso contrário retorna NULL
518754
public function get($key) {
        $filename = $this->generateFileLocation($key);
        if (file_exists($filename) && is_readable($filename)) {
            $cache = unserialize(file_get_contents($filename));
            if ($cache['expires'] > time()) {
                return $cache['content'];
            } else {
                unlink($filename);
            }
        }
        return null;
    }
1195410
protected function getFilepath(string $key):string{
		$h = hash('sha256', $key);

		return $this->cachedir.$h[0].DIRECTORY_SEPARATOR.$h[0].$h[1].DIRECTORY_SEPARATOR.$h;
	}
295139
protected function getCache($key) {
        $cached = ArrayHelper::getValue($this->cachedData, $key);
        if (!isset($cached)) {
            $cacheData = $this->resolveCacheComponent()->get($this->cacheKeyName);
            $cached = $this->cachedData[$key] = ArrayHelper::getValue($cacheData, $key);
        }
        return $cached;
    }
1245248
protected function retrieve($key)
        {
            if (!File::exists($this->path . $key)) {
                return null;
            }

            // File based caches store have the expiration timestamp stored in
            // UNIX format prepended to their contents. We'll compare the
            // timestamp to the current time when we read the file.
            if (time() >= substr($cache = fgc($this->path . $key), 0, 10)) {
                return $this->forget($key);
            }

            return unserialize(substr($cache, 10));
        }
793314
private function getFilenameFromCacheKey($key)
    {
        return $this->cacheDir
        . DIRECTORY_SEPARATOR
        . $this->getDirectoryHash($key)
        . DIRECTORY_SEPARATOR
        . $key
        . self::CACHE_FILE_SUFFIX;
    }
1170055
static function storeCache( $key )
    {
        $translationCache = eZTranslationCache::cacheTable();
        if ( !isset( $translationCache[$key] ) )
        {
            eZDebug::writeWarning( "Translation cache for key '$key' does not exist, cannot store cache", __METHOD__ );
            return;
        }
        $internalCharset = eZTextCodec::internalCharset();
//         $cacheFileKey = "$key-$internalCharset";
        $cacheFileKey = $key;
        $cacheFileName = md5( $cacheFileKey ) . '.php';

        $cache =& $translationCache[$key];

        if ( !file_exists( eZTranslationCache::cacheDirectory() ) )
        {
            eZDir::mkdir( eZTranslationCache::cacheDirectory(), false, true );
        }
        $php = new eZPHPCreator( eZTranslationCache::cacheDirectory(), $cacheFileName );
        $php->addRawVariable( 'eZTranslationCacheCodeDate', self::CODE_DATE );
        $php->addSpace();
        $php->addRawVariable( 'CacheInfo', array( 'charset' => $internalCharset ) );
        $php->addRawVariable( 'TranslationInfo', $cache['info'] );
        $php->addSpace();
        $php->addRawVariable( 'TranslationRoot', $cache['root'] );
        $php->store( true );
    }
559593
protected function locate($key): ?KeyValueBucket
    {
        for ($this->rewind(); $this->valid(); $this->next()) {
            /** @var KeyValueBucket $current */
            $current = $this->current;
            if (Validate::areEqual($key, $current->key())) {
                return $current;
            }
        }

        return null;
    }
136170
public static function get(string $key)
    {
        $encodedValue = @file_get_contents(self::determineDabaseFilePathFor($key));
        if ($encodedValue === false) {
            return null;
        }

        return Json::decode($encodedValue);
    }
506375
public function getFile(string $key, string $file) : string
    {
        return $this->getDirectory($key) . '/' . $file;
    }
751984
public function get(string $key)
    {
        $result = null;
        if (isset($this->configuration[$key])) {
            $result = (string)$this->configuration[$key];
        } elseif (isset($GLOBALS['TSFE']->config['config']['tx_staticfilecache.'][$key])) {
            $result = (string)$GLOBALS['TSFE']->config['config']['tx_staticfilecache.'][$key];
        }

        return $result;
    }
336349
protected function loadKey($key)
    {
        // Pegar soh o primeiro key
        $parts = explode('.', $key);
        $first = $parts[0];

        // Verificar se item já foi adicionado
        if (array_key_exists($first, $this->items)) {
            return;
        }

        if (array_key_exists($first, $this->finded)) {
            return;
        }

        $file = config_path(sprintf('%s.php', $first));
        if (file_exists($file)) {
            $this->set($first, require $file);
        }

        $this->finded[$first] = true;
    }
83343
public function get($key)
	{
		$hash = md5($key);
		$cacheFile = $this->getPath().'/'.$hash.'.cache';

		if (!is_file($cacheFile)) {
			return null;
		}
		return unserialize(file_get_contents($cacheFile));
	}
1320336
public static function getFromCache($key)
  {
    static::initialize();
    $v = self::$cm->getFromCache($key);
    return $v ? $v['value'] : null;
  }
870837
public function getFromCache($key)
  {
    $value = $this->memcache->get($this->buildMKey($key));
    if ($value) {
      return unserialize($value);
    }
    return null;
  }
653183
private function getKeyPath($key)
    {
        $this->validateKey($key);
        $file = sha1($key);
        $this->hashDirectory->processFile($file);
        return $this->hashDirectory->getFileStoragePath();
    }
691244
function getCache( $key ) {

        return isset( $this->_cache[ $key ] ) ? $this->_cache[ $key ] : null;

    }
1207596
protected function cacheFile(string $key): string
    {
        return $this->path . '/' . $this->prefix . $key . $this->extension;
    }