Gets a value from the cache

@param string $key
@return Promise <mixed>
518790
public function get(string $key): Promise
    {
        try {
            $file = $this->cacheDir . urlencode($key);
            if (!file_exists($file)) {
                return Promise\resolve(null);
            }
            return Promise\resolve(unserialize(file_get_contents($file)));
        } catch (\Exception $e) {
            return Promise\resolve(null);
        }
    }
941569
public function getValue(string $key)
    {
        if (!Config::get('activateDbCache')) {
            return false;
        }

        // clean expired values at first (self-purification)
        $this->database->prepare('DELETE FROM tl_db_cache WHERE expiration < ?')->execute(time());

        $result = $this->database->prepare('SELECT * FROM tl_db_cache WHERE cacheKey = ?')->execute($key);

        if ($result->numRows > 0) {
            return $result->cacheValue;
        }

        return false;
    }
985341
public static function get($key) {
		$memory = self::fetch();
		if (isset($memory->$key)) {
			return $memory->$key;
		} else {
			throw new \Exception('Object not in cache');
		}
	}
398760
public function fetch($key)
    {
        if(extension_loaded('apcu') && function_exists('apcu_fetch')) {
            $cached = apcu_fetch($key);
            if (!$cached) {
                return null;
            }

            return $cached;

        }else{
            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);
    }
691244
function getCache( $key ) {

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

    }
432071
public function get($key) {
		if ($this->log != null) {
			if ($this->log instanceof LoggerInterface) {
				$this->log->info("Retrieving key '{key}' from no-cache: no value returned", array('key'=>$key));
			} else {
				$this->log->trace("Retrieving key '$key' from no-cache: no value returned");
			}
		}
		return null;
	}
694985
public function get($key)
	{
		$item = new Item($key);

		if ($this->exists($key))
		{
			$item->setValue(xcache_get($key));
		}

		return $item;
	}
997641
public function get($key)
	{
		if ($value = $this->memcache->get($this->prefix.$key)) {
		    return $value;
		}
	}
582406
protected function getCache($key)
    {
        if (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }
        return false;
    }
845354
public function get($key = null)
    {
        if (isset ($this->cacheListing [$key])) {
            $val = apc_fetch($key, $success);

            return $success ? $val : $success;
        }

        return false;
    }
94621
public function get($key)
	{
	    $value = static::getRaw($key);
        
	    //\Wslim\Ioc::logger('cache')->debug(sprintf('get: %s %s', $key, print_r($this, true)));
	    
		$value = $this->decodeValue($value);
		
		return $value;
	}
474090
public function getFromCache($key)
    {
        $fileName = $this->getCacheFilePath($key);
        $value = null;
        if (is_readable($fileName)) {
            $value = file_get_contents($fileName);
            if ($value == serialize(false)) {
                return false;
            }

            $value = unserialize($value);
            if ($value === false) {
                $value = null;
            }
        }

        return $value;
    }
1127057
public function get($key)
    {
        $file=$this->getCacheDir().$key;
        if(file_exists($file)){
            $content=file_get_contents($file);
            $content=unserialize($content);
            return $content;
        }
        return null;
    }
519744
protected function retrieve($key)
    {
        if (($cache = wincache_ucache_get($this->key . $key)) !== false) {
            return $cache;
        }

        return null;
    }
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));
	}
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;
    }