You are here

function radioactivity_determine_memcached_availability in Radioactivity 5

Same name and namespace in other branches
  1. 6 radioactivity.inc \radioactivity_determine_memcached_availability()
2 calls to radioactivity_determine_memcached_availability()
radioactivity_admin_general_form in ./radioactivity.module
radioactivity_get_memcached_enable in ./radioactivity.inc

File

./radioactivity.inc, line 226

Code

function radioactivity_determine_memcached_availability() {
  static $availability;
  if (!isset($availability)) {
    if (!function_exists('dmemcache_object')) {
      $availability = RADIOACTIVITY_MEMCACHE_NO_MODULE;
    }
    elseif (!dmemcache_object('radioactivity')) {
      $availability = RADIOACTIVITY_MEMCACHE_NO_BIN;
    }
    else {
      $availability = RADIOACTIVITY_MEMCACHE_OK;
    }
  }
  return $availability;
}