private function RadioactivityMemcachedIncidentStorage::connect in Radioactivity 7.2
Connect to the memcache server
2 calls to RadioactivityMemcachedIncidentStorage::connect()
- RadioactivityMemcachedIncidentStorage::addIncident in includes/
RadioactivityMemcachedIncidentStorage.inc - Add incident to cache
- RadioactivityMemcachedIncidentStorage::processIncidents in includes/
RadioactivityMemcachedIncidentStorage.inc - Process incidents in the deferred queue
File
- includes/
RadioactivityMemcachedIncidentStorage.inc, line 20 - Memcached incident storage class
Class
- RadioactivityMemcachedIncidentStorage
- @file Memcached incident storage class
Code
private function connect() {
$mc = null;
if (class_exists('Memcache')) {
$extension = 'Memcache';
}
elseif (class_exists('Memcached')) {
$extension = 'Memcached';
}
if (empty($extension)) {
return FALSE;
}
$mc = new $extension();
$connected = @$mc
->addServer(VAR_RADIOACTIVITY_MEMCACHED_HOST, VAR_RADIOACTIVITY_MEMCACHED_PORT);
if ($connected) {
return $mc;
}
return FALSE;
}