Neos\Cache\Backend\SimpleFileBackend::get PHP Method

get() public method

Loads data from a cache file.
public get ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
return mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded
    public function get($entryIdentifier)
    {
        if ($entryIdentifier !== basename($entryIdentifier)) {
            throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756877);
        }
        $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
        if (!file_exists($pathAndFilename)) {
            return false;
        }
        $lock = new Lock($pathAndFilename, false);
        $result = file_get_contents($pathAndFilename);
        $lock->release();
        return $result;
    }