Memcache 函数
PHP 手册

Memcache::close

(PECL memcache >= 0.4.0)

Memcache::closeClose memcached server connection

说明

bool Memcache::close ( void )

Memcache::close() closes connection to memcached server. This function doesn't close persistent connections, which are closed only during web-server shutdown/restart. Also you can use memcache_close() function.

返回值

如果成功则返回 TRUE,失败则返回 FALSE

范例

Example #1 Memcache::close() example

<?php

/* procedural API */
$memcache_obj memcache_connect('memcache_host'11211);
/* 
do something here ..
*/
memcache_close($memcache_obj);

/* OO API */
$memcache_obj = new Memcache;
$memcache_obj->connect('memcache_host'11211);
/* 
do something here ..
*/
$memcache_obj->close();

?>

参见


Memcache 函数
PHP 手册