示例#1
0
文件: Cache.php 项目: sebst3r/nZEDb
 /**
  * Flush all data from the cache server?
  */
 public function flush()
 {
     if ($this->connected === true && $this->ping() === true) {
         if ($this->isRedis === true) {
             $this->server->flushAll();
         } else {
             $this->server->flush();
         }
     }
 }
示例#2
0
 /**
  * Flush all data from the cache server?
  */
 public function flush()
 {
     if ($this->ping()) {
         switch (NN_CACHE_TYPE) {
             case self::TYPE_REDIS:
                 $this->server->flushAll();
                 break;
             case self::TYPE_MEMCACHED:
                 $this->server->flush();
                 break;
             case self::TYPE_APC:
                 apc_clear_cache("user");
                 apc_clear_cache();
                 break;
         }
     }
 }