Warning: file_put_contents(): Only -1 of 56 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
Memcache::addServer Memcache::connect Memcache PHP Manual Memcache::close (PECL memcache:0.4-2.1.2) — Close memcached server connection Descrierea bool ( void ) Memcache::close() closes to memca...
Forum und email

Memcache::close

(PECL memcache:0.4-2.1.2)

Memcache::close — Close memcached server connection

Descrierea

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.

Valorile întroarse

Întoarce valoarea TRUE în cazul succesului sau FALSE în cazul eşecului.

Exemple

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();

?>

Vedeţi de asemenea

  • Memcache::connect()
  • Memcache::pconnect()