protected function _read($key, $streams = false) {
		$path = "{$this->_config['path']}/{$key}";

		if (!is_file($path) || !is_readable($path)) {
			return false;
		}
		if (!$stream = fopen($path, 'rb')) {
			return false;
		}
		$header = stream_get_line($stream, static::MAX_HEADER_LENGTH, "\n");

		if (!preg_match('/^\{\:expiry\:(\d+)\}/', $header, $matches)) {
			return false;
		}
		if ($streams) {
			$value = fopen('php://temp', 'wb');
			stream_copy_to_stream($stream, $value);
			rewind($value);
		} else {
			$value = stream_get_contents($stream);
		}
		fclose($stream);

		return ['expiry' => $matches[1], 'value' => $value];

	}
protected function _read($key, $streams = false) {
		$path = "{$this->_config['path']}/{$key}";

		if (!is_file($path) || !is_readable($path)) {
			return false;
		}
		if (!$stream = fopen($path, 'rb')) {
			return false;
		}
		$header = stream_get_line($stream, static::MAX_HEADER_LENGTH, "\n");

		if (!preg_match('/^\{\:expiry\:(\d+)\}/', $header, $matches)) {
			return false;
		}
		if ($streams) {
			$value = fopen('php://temp', 'wb');
			stream_copy_to_stream($stream, $value);
			rewind($value);
		} else {
			$value = stream_get_contents($stream);
		}
		fclose($stream);

		return ['expiry' => $matches[1], 'value' => $value];

	}
protected function _read ( $ key , $ streams = false ) { $ path = "{$this->_config['path']}/{$key}" ; if ( ! is_file ( $ path ) || ! is_readable ( $ path ) ) { return false ; } if ( ! $ stream = fopen ( $ path , 'rb' ) ) { return false ; } $ header = stream_get_line ( $ stream , static :: MAX_HEADER_LENGTH , "\n" ) ; if ( ! preg_match ( '/^\{\:expiry\:(\d+)\}/' , $ header , $ matches ) ) { return false ; } if ( $ streams ) { $ value = fopen ( 'php://temp' , 'wb' ) ; stream_copy_to_stream ( $ stream , $ value ) ; rewind ( $ value ) ; } else { $ value = stream_get_contents ( $ stream ) ; } fclose ( $ stream ) ; return [ 'expiry' => $ matches [ 1 ] , 'value' => $ value ] ; }
Reads from file, parses its format and returns its expiry and value.

@see lithium\storage\cache\adapter\File::read()
@param string $key Key to uniquely identify the cached item.
@param boolean $streams When `true` will return stream handle instead of value.
@return array|boolean Array with `expiry` and `value` or `false` otherwise.
Reads from file parses its format and returns its expiry and value .