Exemplo n.º 1
0
 function cleanup()
 {
     $engine = $this->_config->get_string('fragmentcache.engine');
     switch ($engine) {
         case 'file':
             w3_require_once(W3TC_LIB_W3_DIR . '/Cache/File/Cleaner.php');
             $w3_cache_file_cleaner = new W3_Cache_File_Cleaner(array('cache_dir' => w3_cache_blog_dir('fragment'), 'clean_timelimit' => $this->_config->get_integer('timelimit.cache_gc')));
             $w3_cache_file_cleaner->clean();
             break;
     }
 }
Exemplo n.º 2
0
 function cleanup_local()
 {
     $engine = $this->_config->get_string('pgcache.engine');
     switch ($engine) {
         case 'file':
             w3_require_once(W3TC_LIB_W3_DIR . '/Cache/File/Cleaner.php');
             $w3_cache_file_cleaner = new W3_Cache_File_Cleaner(array('cache_dir' => w3_cache_blog_dir('page'), 'clean_timelimit' => $this->_config->get_integer('timelimit.cache_gc')));
             $w3_cache_file_cleaner->clean();
             break;
         case 'file_generic':
             w3_require_once(W3TC_LIB_W3_DIR . '/Cache/File/Cleaner/Generic.php');
             if (w3_get_blog_id() == 0) {
                 $flush_dir = W3TC_CACHE_PAGE_ENHANCED_DIR;
             } else {
                 $flush_dir = W3TC_CACHE_PAGE_ENHANCED_DIR . '/' . w3_get_domain(w3_get_host());
             }
             $w3_cache_file_cleaner_generic = new W3_Cache_File_Cleaner_Generic(array('exclude' => array('.htaccess'), 'cache_dir' => $flush_dir, 'expire' => $this->_config->get_integer('browsercache.html.lifetime'), 'clean_timelimit' => $this->_config->get_integer('timelimit.cache_gc')));
             $w3_cache_file_cleaner_generic->clean();
             break;
     }
 }
Exemplo n.º 3
0
 /**
  * Does disk cache cleanup
  *
  * @return void
  */
 function cleanup()
 {
     w3_require_once(W3TC_LIB_W3_DIR . '/Cache/File/Cleaner.php');
     $w3_cache_file_cleaner = new W3_Cache_File_Cleaner(array('cache_dir' => w3_cache_blog_dir('object'), 'clean_timelimit' => $this->_config->get_integer('timelimit.cache_gc')));
     $w3_cache_file_cleaner->clean();
 }