/**
  * Flushes all data
  *
  * @return boolean
  */
 function flush()
 {
     w3_emptydir($this->_cache_dir);
     return true;
 }
Exemplo n.º 2
0
 /**
  * Flushes all data
  *
  * @param string $group Used to differentiate between groups of cache values
  * @return boolean
  */
 function flush($group = '')
 {
     @set_time_limit($this->_flush_timelimit);
     $flush_dir = $group ? $this->_cache_dir . DIRECTORY_SEPARATOR . $group . DIRECTORY_SEPARATOR : $this->_flush_dir;
     w3_emptydir($flush_dir, $this->_exclude);
     return true;
 }
Exemplo n.º 3
0
 /**
  * Flush cache
  *
  * @return bool
  */
 public function flush()
 {
     @set_time_limit($this->_flushTimeLimit);
     return w3_emptydir($this->_flush_path, $this->_exclude);
 }
Exemplo n.º 4
0
 private function _flush_cache($forced_preview = null)
 {
     $this->_md5 = null;
     if ($this->_blog_id > 0) {
         @unlink($this->_get_config_filename($forced_preview));
     } else {
         // clear whole cache if we change master config
         w3_require_once(W3TC_INC_DIR . '/functions/file.php');
         w3_emptydir(W3TC_CACHE_CONFIG_DIR);
     }
 }
Exemplo n.º 5
0
 /**
  * Flushes all data
  *
  * @return boolean
  */
 function flush()
 {
     @set_time_limit($this->_flush_timelimit);
     return w3_emptydir($this->_cache_dir, $this->_exclude);
 }
Exemplo n.º 6
0
 /**
  * Flushes all data
  *
  * @return boolean
  */
 function flush()
 {
     w3_emptydir($this->_cache_dir, array($this->_cache_dir . '/.htaccess'));
     return true;
 }
 /**
  * Flushes cache
  */
 function flush()
 {
     static $cache_path = null;
     $cache =& $this->_get_cache();
     if (is_a($cache, 'W3_Cache_Memcached') && class_exists('Memcache')) {
         return $this->_memcached->flush();
     } elseif (is_a($cache, 'Minify_Cache_APC') && function_exists('apc_clear_cache')) {
         return apc_clear_cache('user');
     } elseif (is_a($cache, 'Minify_Cache_File')) {
         if (!is_dir(W3TC_CACHE_FILE_MINIFY_DIR)) {
             $this->log(sprintf('Cache directory %s does not exists', W3TC_CACHE_FILE_MINIFY_DIR));
         }
         return w3_emptydir(W3TC_CACHE_FILE_MINIFY_DIR, array(W3TC_CACHE_FILE_MINIFY_DIR . '/index.php', W3TC_CACHE_FILE_MINIFY_DIR . '/.htaccess'));
     }
     return false;
 }