Horde_Cache::testReadWrite PHP Method

testReadWrite() public method

Tests the driver for read/write access.
public testReadWrite ( ) : boolean
return boolean True if read/write is available.
    public function testReadWrite()
    {
        $key = '__horde_cache_testkey';
        try {
            $this->_storage->set($key, 1);
            if ($this->_storage->exists($key)) {
                $this->_storage->expire($key);
                return true;
            }
        } catch (Exception $e) {
        }
        return false;
    }