Prado\I18N\core\TCache_Lite::_write PHP Method

_write() public method

Write the given data in the cache file
public _write ( string $data ) : boolean
$data string data to put in cache
return boolean true if ok
    function _write($data)
    {
        $fp = @fopen($this->_file, "wb");
        if ($fp) {
            if ($this->_fileLocking) {
                @flock($fp, LOCK_EX);
            }
            if ($this->_readControl) {
                @fwrite($fp, $this->_hash($data, $this->_readControlType), 32);
            }
            $len = strlen($data);
            @fwrite($fp, $data, $len);
            if ($this->_fileLocking) {
                @flock($fp, LOCK_UN);
            }
            @fclose($fp);
            return true;
        }
        $this->raiseError('Cache_Lite : Unable to write cache !', -1);
        return false;
    }