Exemplo n.º 1
0
 public function flush()
 {
     $start = microtime(true) * 1000;
     $res = parent::flush();
     $this->appendLog(self::TYPE_FLUSH, '', round(microtime(true) * 1000 - $start));
     return $res;
 }
Exemplo n.º 2
0
 public function testFlush()
 {
     $this->_model->save('data_for_cache_id_1', 'cache_id_1', array('tag_1'));
     $this->_model->save('data_for_cache_id_2', 'cache_id_2', array('tag_2'));
     $this->_model->save('data_for_cache_id_3', 'cache_id_3');
     $this->_model->flush();
     $this->assertFalse($this->_model->load('cache_id_1'));
     $this->assertFalse($this->_model->load('cache_id_2'));
     $this->assertFalse($this->_model->load('cache_id_3'));
 }
Exemplo n.º 3
0
 /**
  * Flush full page cache
  *
  * @return Enterprise_PageCache_Model_Observer
  */
 public function flushCache()
 {
     $this->_cacheInstance->flush();
     return $this;
 }
Exemplo n.º 4
0
 /**
  * @dataProvider successFailureDataProvider
  * @param bool $result
  */
 public function testFlush($result)
 {
     $this->_cacheFrontend->expects($this->once())->method('clean')->will($this->returnValue($result));
     $this->assertEquals($result, $this->_model->flush());
 }