You are here

protected function PredisCache::doGetStats in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php \Doctrine\Common\Cache\PredisCache::doGetStats()

Retrieves cached information from the data store.

@since 2.2

Return value

array|null An associative array with server's statistics if available, NULL otherwise.

Overrides CacheProvider::doGetStats

File

vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php, line 95

Class

PredisCache
Predis cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function doGetStats() {
  $info = $this->client
    ->info();
  return array(
    Cache::STATS_HITS => $info['Stats']['keyspace_hits'],
    Cache::STATS_MISSES => $info['Stats']['keyspace_misses'],
    Cache::STATS_UPTIME => $info['Server']['uptime_in_seconds'],
    Cache::STATS_MEMORY_USAGE => $info['Memory']['used_memory'],
    Cache::STATS_MEMORY_AVAILABLE => false,
  );
}