reads in the cached file, if it exists
unserialises and stores in data property
@param  string $key example-file-name
@return bool
506609
public function read($fileName)
    {
        $path = $this->getPathBase($fileName);

        if (!file_exists($path)) {
            return;
        }

        $data = file_get_contents($path);
        return $this->data = unserialize($data);
    }
737554
public function read($key)
    {
        $this->_cachedData or $this->_cachedData = Cache::get('model-metadata');
        return isset($this->_cachedData[$key]) ? $this->_cachedData[$key] : null;
    }
126200
protected function getData($key)
    {
        $filename = $this->file($key);
        if (!file_exists($filename))
            return false;
        else {
            $data = $this->readFile($filename);

            if ($this->isExpired(null, $data))
                return false;
            else {
                 // if going to expire in 10 seconds, extend the cache and let this request refresh it
                $expire   = $data['expires'];
                $value    = $data['value'];
                $duration = $data['duration'];
                $now      = $this->DateFactory->newStorageDate();
                if (!empty($value) && $duration > 0 && $now->toUnix() > ($expire - 10) ) {
                    $this->put($key, $value, $duration);
                    return false;
                }

                return $data;
            }
        }

    }
940765
public function isCached($key)
    {
        if ($this->getCache() != false) {
            $cached = $this->getCache();

            return isset($cached[$key]['data']);
        }
    }
207397
function get($key)
    {
        if (!array_key_exists($key, $this->cache)) {
            return $this->read_record($key);
        }

        return $this->cache[$key];
    }
196615
public function remove(string $key)
  {
    $file = $this->file;

    if (file_exists($file)) {
      $data = unserialize($this->decrypt(file_get_contents($file)));

      if (is_array($data) && isset($data[$key])) {
        unset($data[$key]);
        $data = $this->encrypt(serialize($data));
        return file_put_contents($file, $data);
      }
    }

    return false;
  }
854925
public function read($key)
    {
        try {
            $cache = $this->db->from($this->table)
                ->where($this->columns['key'])->eq($this->prefix . $key)
                ->select()
                ->fetchAssoc()
                ->first();
        } catch (PDOException $e) {
            return false;
        }

        if ($cache !== false) {
            $expire = (int) $cache[$this->columns['ttl']];

            if ($expire === 0 || time() < $expire) {
                return unserialize($cache[$this->columns['data']]);
            }

            $this->delete($key);
        }

        return false;
    }
83343
public function get($key)
	{
		$hash = md5($key);
		$cacheFile = $this->getPath().'/'.$hash.'.cache';

		if (!is_file($cacheFile)) {
			return null;
		}
		return unserialize(file_get_contents($cacheFile));
	}
697767
public static function read(string $key)
    {
        /* Check if initialized */
        if (!self::$initialized) {
            self::initialize();
        }

        /* Return key */
        return self::$configs[$key];
    }
1186861
public function get($key)
    {
        $md5 = md5($key);
        $folderPath = $this->getFolderPathFromMd5($md5);
        $path = $this->path . self::DS . $folderPath . self::DS . $this->prefix . $md5;
        if (!file_exists($path) || !is_readable($path)) {
            return false;
        }

        $content = file_get_contents($path);
        if (!$content) {
            return false;
        }

        $pieces = explode(PHP_EOL, $content);
        if (!is_array($pieces) || !is_numeric($pieces[0])) {
            unlink($path);
            return false;
        }

        $val = @unserialize($pieces[1]);
        if ($val === false) {
            $this->remove($key);
            return false;
        }

        return $val;
    }
1163684
private function read($key)
    {
        $_jsonFile = $this->_root.$key.'.json';
        if(empty($this->_nr[$key])) {
            if (file_exists($_jsonFile)) {
                $_ar = @file_get_contents($_jsonFile);
                $ar = json_decode($_ar,true);
            } else {
                $ar = array();
            }
            $this->_nr[$key] = $ar;
        }
        return $this;
    }
71365
public function read($key)
    {
        $key = $this->_key($key);
        if (!isset($this->data[$key])) {
            return false;
        }
        $data = $this->data[$key];

        // Check expiration
        $now = time();
        if ($data['exp'] <= $now) {
            unset($this->data[$key]);

            return false;
        }

        return $data['val'];
    }
1245180
public function get($key)
    {
        $file = $this->getFilePath($key);

        if (file_exists($file)) {
            $data = file_get_contents($file);

            if (!empty($data)) {
                return $data;
            }
        }

        return false;
    }
1079768
public function get($key)
	{
		$file = $this->path($key);

		if (!file_exists($file))
		{
			return null;
		}

		$data = @unserialize(file_get_contents($file));

		if (!$data)
		{
			throw new RuntimeException('Cache file is invalid.');
		}

		if ($this->isDataExpired($data))
		{
			$this->forget($key);
			return null;
		}

		return $data['value'];
	}
888337
public function read($key)
    {
        if ($value = $this->redis->get($key)) {
            $arr = unserialize($value);
            $this->changed = $arr['changed'];
            $this->ip      = $arr['ip'];
            $this->vars    = $arr['vars'];
            $this->key     = $key;

            return !empty($this->vars) ? (string) $this->vars : '';
        }

        return '';
    }
1117502
public function readFrom(string $key)
    {
        $result = false;

        if ($this->skipCache()) {
            $this->warnings[] = 'Skipping read from cache';

            return $result;
        }

        $cachedData = CakeCache::read($key, $this->getConfig());
        if (!$this->isValidCache($cachedData)) {
            CakeCache::delete($key, $this->getConfig());

            return $result;
        }
        $result = $cachedData['data'];

        return $result;
    }
789007
function read($key)
    {
        if (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }

        return $this->read_record($key, true);
    }