As I see, library does check whenever the connection is alive before trying to contact the daemon.
https://github.com/phalcon/cphalcon/blob/master/phalcon/cache/backend/libmemcached.zep#L136
But I guess you're talking about HA here, what happens if the daemon goes down. Since this is only a wrapper, there's no implementation for handling system level (daemon) processes, or even remote servers in case your memcacheD is hosted elsewhere.
That's why I implemented this in services container:
// NOTE: exiting to command line puts too much overhead
$libmemCheck = <<<DAEMON
ps -e | grep memcached | awk '{print $1}'
DAEMON;
exec($libmemCheck, $rv, $status);
!$status ? $pidMem = $rv[0] : $pidMem = 0x00;
//you can also fetch the PID from file system and compare it with your ps command return value
$pid = file_exists('/var/run/memcached.pid') ? file_get_contents('/var/run/memcached.pid') : false;
//check process ID
$pid = file_exists('/var/run/memcached.pid') ? true : false;
//check socket
$socketExists = file_exists($config->_daemon->socket) ? true : false; // socket defined as: /var/run/memcached.sock
//throw exception if the daemon is N/A
if (!$socketExists || !$pid) throw new \Phalcon\Exception('DAEMON is NaN!');