Get a value from cache.

@param string $path Cache identifier for which you wish to get the value.

@return bool|string
422244
private function loadFromCache($path)
    {
        if ($this->getCache()) {
            return $this->getCache()->read(self::CACHE_KEY . md5($path));
        }

        return false;
    }
1013985
public function getNodeForPath($path)
    {
        $path = trim($path, '/');
        if (isset($this->cache[$path])) {
            return $this->cache[$path];
        }

        // Is it the root node?
        if (!strlen($path)) {
            return $this->rootNode;
        }

        // Attempting to fetch its parent
        list($parentName, $baseName) = Uri\split($path);

        // If there was no parent, we must simply ask it from the root node.
        if ('' === $parentName) {
            $node = $this->rootNode->getChild($baseName);
        } else {
            // Otherwise, we recursively grab the parent and ask him/her.
            $parent = $this->getNodeForPath($parentName);

            if (!($parent instanceof ICollection)) {
                throw new Exception\NotFound('Could not find node at path: '.$path);
            }
            $node = $parent->getChild($baseName);
        }

        $this->cache[$path] = $node;

        return $node;
    }
151112
public function get($path, $params = [])
    {
        return $this->ttools->makeRequest(
            TTools::API_BASE . '/' . TTools::API_VERSION . $path,
            $params,
            'GET',
            false
        );
    }
100742
public function get($path)
    {
        $configValue = $this->getRepository()->findOneByPath($path);
        if ($configValue) {
            return $configValue->getValue();
        }

        return null;
    }
701647
protected function getValue(array $data, array $path)
    {
        $found = true;

        for ($x = 0; ($x < count($path) && $found); $x++) {
            $key = $path[$x];

            if (isset($data[$key])) {
                $data = $data[$key];
            } else {
                $found = false;
            }
        }

        if ($found) {
            return $data;
        }
        return null;
    }
948704
protected function _getAuth($path = null) {
		if ($this->getConfig('autoClearCache') && Configure::read('debug')) {
			Cache::delete($this->getConfig('allowCacheKey'), $this->getConfig('cache'));
		}
		$roles = Cache::read($this->getConfig('allowCacheKey'), $this->getConfig('cache'));
		if ($roles !== false) {
			return $roles;
		}

		if ($path === null) {
			$path = $this->getConfig('allowFilePath');
		}
		$iniArray = $this->_parseFiles($path, $this->getConfig('allowFile'));

		$res = [];
		foreach ($iniArray as $key => $actions) {
			$res[$key] = $this->_deconstructIniKey($key);
			$res[$key]['map'] = $actions;

			$actions = explode(',', $actions);

			if (in_array('*', $actions)) {
				$res[$key]['actions'] = [];
				continue;
			}

			foreach ($actions as $action) {
				$action = trim($action);
				if (!$action) {
					continue;
				}

				$res[$key]['actions'][] = $action;
			}
		}

		Cache::write($this->getConfig('allowCacheKey'), $res, $this->getConfig('cache'));
		return $res;
	}
575289
public function getConfigValueFromPath($path)
    {
        /** @var Configuration $node */
        $node = $this->configuration;

        foreach (explode('/', $path) as $nodeName) {
            if (!is_object($node)) {
                return null;
            }

            $node = $node->{'get' . ucfirst($nodeName)}();
        }

        return $node;
    }
941506
public static function all($path) {

		$data =  array();

		// Artisan::call('config:cache');

		if(file_exists($path)) {

			$values = file_get_contents($path);

			$values = explode("\n", $values);

			foreach ($values as $key => $value) {

				$var = explode('=',$value);

				if(count($var) ==  2) {
					if($var[0] != "")
						$data[$var[0]] = $var[1] ? $var[1] : null;
				} else {
					if($var[0] != "")
						$data[$var[0]] = null;
				}
			}

			array_filter($data);
		}

		return $data;
	
	}
1074315
public function getUrl($path) {
        $mapping = $this->mapper->get($path);

        if (!$mapping) {
            return false;
        }

        try {
            $volume = $this->client->lookup($mapping['fid']);

            return $this->client->buildVolumeUrl($volume->getPublicUrl(), $mapping['fid']);
        } catch (SeaweedFSException $e) {
            return false;
        }
    }
714357
protected function _getProcessorByPath($path)
    {
        if (!$path) {
            return;
        }

        if (!is_array(static::$processorcachepath)) {
            static::$processorcachepath = array();
        }

        if (array_key_exists($path, static::$processorcachepath)) {
            return static::$processorcachepath[$path];
        }

        foreach ($this->processors as &$processor) {

            /* @var $processor AbstractFileProcessor */
            $match = $processor->_getConfig('fieldmatch');

            if (preg_match($match, $path)) {
                static::$processorcachepath[$path] = $processor;

                return $processor;
            }
        }
    }
769263
private function serveFromCache($path)
    {
        //try and load the image from the cache
        if ($this->cache->has($path)) {
            $file = $this->cache->get($path);

            $lastModified = new \DateTime();
            $lastModified->setTimestamp($file->getTimestamp());

            $this->setHttpCacheHeaders(
                $lastModified,
                md5($this->getCachePath().$lastModified->getTimestamp()),
                $this->maxAge
            );

            // Respond with 304 not modified
            if ($this->response->isNotModified($this->request)) {
                return true;
            }

            $this->response = new StreamedResponse();

            // Set the headers
            $this->response->headers->set('Content-Type', $file->getMimetype());
            $this->response->headers->set('Content-Length', $file->getSize());

            $this->setHttpCacheHeaders(
                $lastModified,
                md5($this->getCachePath().$lastModified->getTimestamp()),
                $this->maxAge
            );

            $this->response->setCallback(function () use ($file) {
                fpassthru($file->readStream());
            });

            return true;
        }

        return false;
    }
475286
public function get(string $path): ViewInterface
    {
        if (!empty($this->cache) && $this->cache->has($this->context, $path)) {
            return $this->cache->get($this->context, $path);
        }

        $view = $this->findEngine($path)->get($path, $this->context);

        if (!empty($this->cache)) {
            $this->cache->set($this->context, $path, $view);
        }

        return $view;
    }
342742
public function load($path)
    {
        $path = $this->findAbsolutePath($path);

        if ($this->cache) {
            if ($this->cache->isFresh($path, filemtime($path))) {
                $feature = $this->cache->read($path);
            } elseif (null !== $feature = $this->parseFeature($path)) {
                $this->cache->write($path, $feature);
            }
        } else {
            $feature = $this->parseFeature($path);
        }

        return null !== $feature ? array($feature) : array();
    }
618413
public function get(string $path = '/')
    {
        return $this->app->request->base . implode('/', array_map('urlencode', explode('/', $path)));
    }
928564
protected function getBooleanValue($path)
    {
        $normalizedPath = strtolower($path);

        if (in_array($normalizedPath, ['true', 'on', 'yes'])) {
            return true;
        }

        if (in_array($normalizedPath, ['false', 'off', 'no'])) {
            return false;
        }

        return null;
    }
342525
public static function lookupByPath($path)
    {
        if (empty($path)) {
            throw new \InvalidArgumentException('Argument "path" cannot be empty');
        }

        foreach (self::$methods_config as $key => $val) {
            if ($val['path'] === $path) {
                return $val;
            }
        }

        return null;
    }
998544
public function getKeys($path)
    {
        if (empty($path)) {
            return array_keys($this->map->getContainer());
        }
        $value = $this->map[$path];
        if (is_array($value)) {
            return array_keys($value);
        } else {
            return false;
        }

    }