You are here

protected function XcacheCache::doGetStats in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php \Doctrine\Common\Cache\XcacheCache::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/XcacheCache.php, line 99

Class

XcacheCache
Xcache cache driver.

Namespace

Doctrine\Common\Cache

Code

protected function doGetStats() {
  $this
    ->checkAuthorization();
  $info = xcache_info(XC_TYPE_VAR, 0);
  return array(
    Cache::STATS_HITS => $info['hits'],
    Cache::STATS_MISSES => $info['misses'],
    Cache::STATS_UPTIME => null,
    Cache::STATS_MEMORY_USAGE => $info['size'],
    Cache::STATS_MEMORY_AVAILABLE => $info['avail'],
  );
}