Ejemplo n.º 1
0
 /**
  * Get cache server statistics.
  *
  * @return array|string
  * @access public
  */
 public function serverStatistics()
 {
     if ($this->connected === true && $this->ping() === true) {
         if ($this->isRedis === true) {
             return $this->server->info();
         } else {
             return $this->server->getStats();
         }
     }
     return array();
 }
Ejemplo n.º 2
0
 /**
  * Get cache server statistics.
  *
  * @return array
  * @access public
  */
 public function serverStatistics()
 {
     if ($this->ping()) {
         switch (NN_CACHE_TYPE) {
             case self::TYPE_REDIS:
                 return $this->server->info();
             case self::TYPE_MEMCACHED:
                 return $this->server->getStats();
             case self::TYPE_APC:
                 return apc_cache_info();
         }
     }
     return array();
 }