Bluz\Cache\Adapter\PhpFile::doGet PHP Method

doGet() protected method

protected doGet ( string $id ) : boolean | mixed
$id string
return boolean | mixed
    protected function doGet($id)
    {
        $filename = $this->getFilename($id);
        if (!is_file($filename)) {
            return false;
        }
        if (defined('HHVM_VERSION')) {
            // XXX: workaround for https://github.com/facebook/hhvm/issues/1447
            $cacheEntry = eval(str_replace('<?php', '', file_get_contents($filename)));
        } else {
            $cacheEntry = (include $filename);
        }
        if ($cacheEntry['ttl'] !== Cache::TTL_NO_EXPIRY && $cacheEntry['ttl'] < time()) {
            return false;
        }
        return $cacheEntry['data'];
    }