The following is the code snippet i am using to create a memcahed object
with persistantId.
First time when I invoke the script it is going to *"if"* block adds a
server, but for all requests thereafter it should go to *"else"* block. but
it is going to *"if" *block as the getServerList() is returning zero for
subsequent requests.
can someone correct if I am doing something wrong
$memcache = new Memcached('mempool');
if(!count($memcache->getServerList()))
{
//echo ("new pool created has been added");
$memcache->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
return $memcache->addServer('127.0.0.1', 11211);
}
else{
return true;
}
--
---
You received this message because you are subscribed to the Google Groups
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.