function memcache_admin_stats_types in Zircon Profile 8.0
Same name and namespace in other branches
- 8 modules/memcache/memcache_admin/memcache_admin.module \memcache_admin_stats_types()
2 calls to memcache_admin_stats_types()
- memcache_admin_menu in modules/
memcache/ memcache_admin/ memcache_admin.module - Implements hook_menu().
- theme_memcache_admin_stats_raw_table in modules/
memcache/ memcache_admin/ memcache_admin.module
File
- modules/
memcache/ memcache_admin/ memcache_admin.module, line 419
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();
}
}