public function perform()
  {
    $this->_installManagers();

    $this->response->write("Flushing full page cache...");

    $full_cache_mgr = new FullPageCacheManager();
    $full_cache_mgr->flush();

    $this->response->write("done\n");

    $this->response->write("Flushing partial page cache...");

    $partial_cache_mgr = new PartialPageCacheManager();
    $partial_cache_mgr->flush();

    $this->response->write("done\n");

    $this->response->write("Flushing images cache...");

    $image_cache_mgr = new ImageCacheManager();
    $image_cache_mgr->flush();

    $this->response->write("done\n");
  }
  function testFlush()
  {
    $this->_writeSimpleCache('p_test1', $content1 = 'test-content1');
    $this->_writeSimpleCache('p_test2', $content2 ='test-content2');
    $this->_writeSimpleCache('not_page_file', $content3 ='test-content3');

    $cache_manager = new PartialPageCacheManager();
    $cache_manager->flush();

    $files = Fs :: findSubitems(PAGE_CACHE_DIR);

    $this->assertEqual(sizeof($files), 1);

    $file = reset($files);
    $this->assertEqual(Fs :: cleanPath($file), Fs :: cleanPath(PAGE_CACHE_DIR . Fs :: separator() . 'not_page_file'));

    $this->_cleanSimpleCache('not_page_file');
  }