Returns a value from the cache.

@param string $key

@throws Exception

@return mixed
963525
public function get($key)
    {
        $filePath = $this->getFilePathFromKey($key);

        if (!file_exists($filePath)) {
            return false;
        }

        if (!is_readable($filePath)) {
            return false;
        }

        $cacheFileData = file_get_contents($filePath);

        if ($this->config['gzipCompression']) {
            try {
                $cacheFileData = gzuncompress($cacheFileData);
            } catch (\Exception $e) {
                $cacheFileData = false;
            }
        }

        // Bail immediately if the file could not be read, or its data could not be uncompressed
        if (!$cacheFileData) {
            return false;
        }

        $cacheObj = json_decode($cacheFileData);

        // Unable to decode JSON
        if ($cacheObj === null) {
            return false;
        }

        // Check cache object format
        if (!isset($cacheObj->content) || !isset($cacheObj->expiryTimestamp)) {
            return false;
        }

        // Check cache content is serialized
        if (!$this->isSerialized($cacheObj->content)) {
            return false;
        }

        if (!function_exists('sys_getloadavg') && $this->config['unixLoadUpperThreshold'] !== -1) {
            throw new Exception('Your PHP installation does not support `sys_getloadavg` (Windows?). Please set `unixLoadUpperThreshold` to `-1` in your DOFileCache config.');
        }

        if ($this->config['unixLoadUpperThreshold'] == -1) {
            $unixLoad = [0 => -PHP_INT_MAX, 1 => -PHP_INT_MAX, 2 => -PHP_INT_MAX];
        } else {
            $unixLoad = sys_getloadavg();
        }

        if ($cacheObj->expiryTimestamp > time() || $unixLoad[0] >= $this->config['unixLoadUpperThreshold']) {
            // Cache item has not yet expired or system load is too high
            return unserialize($cacheObj->content);
        } else {
            // Cache item has expired
            return false;
        }
    }
291026
public function get($key)
    {
        if (!$this->hasConnection()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        try {
            return $this->memcache->get($key);
        // @codeCoverageIgnoreStart
        } catch (\Exception $e) {
        }

        return false;
        // @codeCoverageIgnoreEnd
    }
576268
public function get($key) {
		
		if ($this->useFallback) {
			$filename = $this->getFileName($key);
			
			if (is_readable($filename)) {
				$fp = fopen($filename, "r");
				$timeout = fgets($fp);
					
				if ($timeout > time() || $timeout==0) {
					$contents = "";
					while (!feof($fp)) {
						$contents .= fread($fp, 65536);
					}
					fclose($fp);
					$value = unserialize($contents);
					//$this->log->trace("Retrieving key '$key' from file cache: value returned:".var_export($value, true));
					if ($this->log) {
						$this->log->trace("Retrieving key '$key' from file cache.");
					}
					return $value;
				} else {
					fclose($fp);
					unlink($filename);
					if ($this->log) {
						$this->log->trace("Retrieving key '$key' from file cache: key outdated, cache miss.");
					}
					return null;
				}
			} else {
				if ($this->log) {
					$this->log->trace("Retrieving key '$key' from file cache: cache miss.");
				}
				return null;
			}
		}
		
		// If not fallback
	
		$success = false;
		$value = apc_fetch($key, $success);
	
		if ($success) {
			if ($this->log) {
				$this->log->trace("Retrieving key '$key' from file cache.");
			}
			return $value;
		} else {
			if ($this->log) {
				$this->log->trace("Retrieving key '$key' from file cache: cache miss");
			}
			return null;
		}
	}
972285
public function get($key)
    {
        if (!$this->requireProvider("Getting key " . $key)) return false;

        return $this->cacheProvider->get($key);
    }
712758
public function getFromCache($key)
  {
    $file = $this->cachePath . $this->getEncodedKey($key);
    if (file_exists($file)) {
      return unserialize(file_get_contents($file));
    }
    return null;
  }
582406
protected function getCache($key)
    {
        if (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }
        return false;
    }
916828
public static function get($key)
    {
        exception_if(!array_has(self::$links, $key), LinkKeyNotFoundException::class, $key);

        return array_get(self::$links, $key);
    }
691244
function getCache( $key ) {

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

    }
204111
public function getItem($key)
    {
        if (($find = $this->searchItem($key)) !== null) {
            return $find;
        }

        throw new \Exception(htmlspecialchars("The item $key was not found."));
    }
584891
public function fetch($key) {
		$result = $this->cacheInstance->getItem ( $this->getRealKey ( $key ) )->get ();
		return eval ( $result );
	}
708113
public function get($key)
    {
        $key = $this->salted($key, $this->suffix);

        $cached = $this->cache->get($key);
        $code = $this->cache->getResultCode();

        if ($code === Memcached::RES_SUCCESS) {
            return $cached;

        } elseif ($code !== Memcached::RES_NOTFOUND) {
            $this->sendAlert('get', $key, $code);
        }

        return null;
    }
848923
public static function get($key) {
        if (!isset(self::$data[$key])) {
            throw new Exception("invalid config key");
        }

        return self::$data[$key];
    }
985341
public static function get($key) {
		$memory = self::fetch();
		if (isset($memory->$key)) {
			return $memory->$key;
		} else {
			throw new \Exception('Object not in cache');
		}
	}
525743
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedStats()->offsetGet($key);
    }
1050692
public function getValue($key) {
		if (isset ( $this->a [$key] )) {
			return $this->a [$key];
		} else {
			return NULL;
		}
	}
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;
	}
564552
public function get($key)
    {
        $k = $this->hash($key);
        if (!isset($this->cache[$k])) {
            return null;
        }
        $item = $this->cache[$k];
        if (isset($item->expire)) {
            if (microtime(true) >= $item->expire) {
                unset($this->cache[$k]);
                return null;
            }
        }
        return $item;
    }