public function load( string $name, bool $returnStorage = false )
	{
		$path = $this->cacheDir . DIRECTORY_SEPARATOR . $name;
		$res  = @fopen($path, 'r');

		if ($res == false)
			return false;

		/** @var FileCacheStorage $storage */
		$storage = @unserialize(fread($res, filesize($path)));

		fclose($res);
		if ($returnStorage)
			return $storage;

		return $storage->data;
	}
public function load( string $name, bool $returnStorage = false )
	{
		$path = $this->cacheDir . DIRECTORY_SEPARATOR . $name;
		$res  = @fopen($path, 'r');

		if ($res == false)
			return false;

		/** @var FileCacheStorage $storage */
		$storage = @unserialize(fread($res, filesize($path)));

		fclose($res);
		if ($returnStorage)
			return $storage;

		return $storage->data;
	}
public function load ( string $ name , bool $ returnStorage = false ) { $ path = $ this -> cacheDir . DIRECTORY_SEPARATOR . $ name ; $ res = @ fopen ( $ path , 'r' ) ; if ( $ res == false ) return false ; /** @var FileCacheStorage $storage */ $ storage = @ unserialize ( fread ( $ res , filesize ( $ path ) ) ) ; fclose ( $ res ) ; if ( $ returnStorage ) return $ storage ; return $ storage -> data ; }
Loads data stored in file.

@param string $name
@param bool   $returnStorage

@return mixed
@throws SettingsException
Loads data stored in file .