note 69405 added to function.memcache-connect
| From: | chrisn at allipo dot com | Date: | Tue, 05 Sep 2006 08:39:45 +0000 |
| Subject: | note 69405 added to function.memcache-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116682@lists.php.net to get a copy of this message | ||
The behavior of Memcache::connect() is to always reinitialize the pool from scratch regardless of
any previous calls to addServer().
E.g.
$mmc = new Memcache()
$mmc->addServer('node1', 11211);
$mmc->addServer('node2', 11211);
$mmc->addServer('node3', 11211);
$mmc->connect('node1', 11211);
The last connect() call clears out the pool and then add and connect node1:11211 making it the only
server.
If you want a pool of memcache servers, do not use the connect() function.
If you only want a single memcache server then there is no need to use the addServer() function.
----
Server IP: 85.116.0.130
Probable Submitter: 82.71.107.45
----
Manual Page -- http://www.php.net/manual/en/function.memcache-connect.php
Edit -- https://master.php.net/note/edit/69405
Del: integrated -- https://master.php.net/note/delete/69405/integrated
Del: useless -- https://master.php.net/note/delete/69405/useless
Del: bad code -- https://master.php.net/note/delete/69405/bad+code
Del: spam -- https://master.php.net/note/delete/69405/spam
Del: non-english -- https://master.php.net/note/delete/69405/non-english
Del: in docs -- https://master.php.net/note/delete/69405/in+docs
Del: other reasons-- https://master.php.net/note/delete/69405
Reject -- https://master.php.net/note/reject/69405
Search -- https://master.php.net/manage/user-notes.php