public function testRollback()
 {
     $this->cache->set('key', 'value');
     $this->bufferedCache->set('key', 'value-2');
     $this->bufferedCache->add('key2', 'value-2');
     // something else directly sets the key in the meantime...
     $this->cache->set('key2', 'value');
     $this->bufferedCache->commit();
     // both changes should have been "rolled back" and both keys should've
     // been cleared, in both buffered & real cache
     $this->assertEquals(false, $this->bufferedCache->get('key'));
     $this->assertEquals(false, $this->bufferedCache->get('key2'));
     $this->assertEquals(false, $this->cache->get('key'));
     $this->assertEquals(false, $this->cache->get('key2'));
 }
 /**
  * @param string $key
  * @param mixed $value
  * @return bool
  */
 public function add($key, $value)
 {
     return $this->cache->add($key, $value, $this->exptime);
 }