/** * Return list of servers, if function exists * * @since 2.1.1 * * @return array */ private function get_servers() { return function_exists('wp_cache_get_server_list') ? wp_cache_get_server_list() : array(); }
/** * Return list of servers, if function exists * * @since 2.1.1 * * @return array */ private function get_servers() { $retval = array(); // Use drop-in function if (function_exists('wp_cache_get_server_list')) { $retval = wp_cache_get_server_list(); // Memcache exists on local server } elseif (class_exists('Memcache')) { $retval = array(array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 10)); } return $retval; }