Doctrine\Common\Cache\MemcachedCache::doGetStats PHP Method

doGetStats() protected method

protected doGetStats ( )
    protected function doGetStats()
    {
        $stats = $this->memcached->getStats();
        $servers = $this->memcached->getServerList();
        $key = $servers[0]['host'] . ':' . $servers[0]['port'];
        $stats = $stats[$key];
        return [Cache::STATS_HITS => $stats['get_hits'], Cache::STATS_MISSES => $stats['get_misses'], Cache::STATS_UPTIME => $stats['uptime'], Cache::STATS_MEMORY_USAGE => $stats['bytes'], Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes']];
    }

Usage Example

Ejemplo n.º 1
0
 public function doGetStats()
 {
     return parent::doGetStats();
 }