library/Rediska/Profiler/Stream.php
public function setMode($mode)
    {
        if (is_resource($this->_stream) && $this->_mode != $mode) {
            $meta = stream_get_meta_data($this->_stream);
            $this->setStream($meta['uri']);
        }

        $this->_mode = $mode;

        return $this;
    }
public function setMode($mode)
    {
        if (is_resource($this->_stream) && $this->_mode != $mode) {
            $meta = stream_get_meta_data($this->_stream);
            $this->setStream($meta['uri']);
        }

        $this->_mode = $mode;

        return $this;
    }
Set access mode

@param string $mode
@return Rediska_Profiler_Stream