Memcache::addServer
Memcache::connect
Memcache 함수 목록
PHP Manual

# Memcache::close

(PECL memcache >= 0.4.0)

Memcache::close — Close 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::connect() - Open memcached server connection
- Memcache::pconnect() - Open memcached server persistent connection

Memcache::addServer
Memcache::connect
Memcache 함수 목록
PHP Manual