protected function XcacheCache::doGetStats

Retrieves cached information from data store

@since 2.2

Return value

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

Overrides CacheProvider::doGetStats

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/XcacheCache.php, line 97

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_AVAILIABLE => $info['avail'],
  );
}