Jenner\SimpleFork\Cache\RedisCache::close PHP Method

close() public method

close the connection
public close ( )
    public function close()
    {
        $this->redis->close();
    }

Usage Example

 public function testAll()
 {
     if (!extension_loaded("Redis")) {
         $this->markTestSkipped("Redis extension is not loaded");
     }
     $this->cache = new Jenner\SimpleFork\Cache\RedisCache();
     $this->cache->set('cache', 'test');
     $this->assertTrue($this->cache->has('cache'));
     $this->assertEquals($this->cache->get('cache'), 'test');
     $this->assertTrue($this->cache->delete('cache'));
     $this->assertNull($this->cache->get('cache'));
     $this->cache->close();
 }