You are here

function memcache_admin_stats_types in Memcache API and Integration 6

Same name and namespace in other branches
  1. 7 memcache_admin/memcache_admin.module \memcache_admin_stats_types()
2 calls to memcache_admin_stats_types()
memcache_admin_menu in memcache_admin/memcache_admin.module
Implementation of hook_menu().
theme_memcache_admin_stats_raw_table in memcache_admin/memcache_admin.module

File

memcache_admin/memcache_admin.module, line 427

Code

function memcache_admin_stats_types($bin) {
  module_load_include('inc', 'memcache', 'dmemcache');
  if ($mc = dmemcache_object($bin)) {
    if ($mc instanceof Memcache) {

      // TODO: Determine which versions of the PECL memcache extension have
      // these other stats types: 'malloc', 'maps', optionally detect this
      // version and expose them.  These stats are "subject to change without
      // warning" unfortunately.
      return array(
        'default',
        'slabs',
        'items',
        'sizes',
      );
    }
    else {

      // The Memcached PECL extension only offers the default statistics.
      return array(
        'default',
      );
    }
  }
  else {
    return array();
  }
}