function dmemcache_close in Memcache API and Integration 7
Same name and namespace in other branches
- 6 dmemcache.inc \dmemcache_close()
Close the connection to the memcache instance.
2 calls to dmemcache_close()
- memcache_enable in ./
memcache.install - Implements hook_enable().
- memcache_requirements in ./
memcache.install - Implements hook_requirements().
File
- ./
dmemcache.inc, line 933 - A memcache API for Drupal.
Code
function dmemcache_close($memcache) {
$extension = dmemcache_extension();
if ($extension == 'Memcache' && $memcache instanceof Memcache) {
$rc = @$memcache->close;
}
elseif ($extension == 'Memcached' && $memcache instanceof Memcached) {
$rc = @$memcache->quit;
}
else {
$rc = FALSE;
}
return $rc;
}