function _read()
{
$fp = @fopen($this->_file, "rb");
if ($this->_fileLocking) {
@flock($fp, LOCK_SH);
}
if ($fp) {
clearstatcache();
$length = @filesize($this->_file);
// $mqr = get_magic_quotes_runtime();
// set_magic_quotes_runtime(0);
if ($this->_readControl) {
$hashControl = @fread($fp, 32);
$length = $length - 32;
}
if ($length) {
$data = @fread($fp, $length);
} else {
$data = '';
}
// set_magic_quotes_runtime($mqr);
if ($this->_fileLocking) {
@flock($fp, LOCK_UN);
}
@fclose($fp);
if ($this->_readControl) {
$hashData = $this->_hash($data, $this->_readControlType);
if ($hashData != $hashControl) {
if (!is_null($this->_lifeTime)) {
@touch($this->_file, time() - 2 * abs($this->_lifeTime));
} else {
@unlink($this->_file);
}
return false;
}
}
return $data;
}
return $this->raiseError('Cache_Lite : Unable to read cache !', -2);
}