/** * 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(); } } }
/** * 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; } } }