function memcache_admin_bin_mapping in Memcache API and Integration 7
Same name and namespace in other branches
- 6 memcache_admin/memcache_admin.module \memcache_admin_bin_mapping()
Helper function, reverse map the memcache_bins variable.
2 calls to memcache_admin_bin_mapping()
- memcache_admin_stats in memcache_admin/
memcache_admin.module - Callback for the Memcache Stats page.
- memcache_admin_stats_raw in memcache_admin/
memcache_admin.module - Callback for the server statistics page.
File
- memcache_admin/
memcache_admin.module, line 244 - For the collection and display of memcache stats.
Code
function memcache_admin_bin_mapping($bin = 'cache') {
$bins = array_flip(variable_get('memcache_bins', array(
'cache' => 'default',
)));
if (isset($bins[$bin])) {
return $bins[$bin];
}
else {
// The default bin is 'cache'.
return _memcache_admin_default_bin($bin);
}
}