protected function setUp()
 {
     parent::setUp();
     // type defined through parameter
     if ($this->getCliArg('use-bagostuff')) {
         $name = $this->getCliArg('use-bagostuff');
         $this->cache = ObjectCache::newFromId($name);
     } else {
         // no type defined - use simple hash
         $this->cache = new HashBagOStuff();
     }
     $this->bufferedCache = new BufferedBagOStuff($this->cache);
     $this->bufferedCache->begin();
 }
 /**
  * Initiate a transaction: this will defer all writes to real cache until
  * commit() is called.
  */
 public function begin()
 {
     $this->cache->begin();
 }