hi Siva,
it is not completely clear what you are doing. You do not need to connect
pecl memcached extension will do this for you.
it is better to keep same object during whole request (singleton) to avoid
reconnection for each operation. If you use persistent option (construct
object with non-empty constructor) for this extension you need to check
that getServerList is empty, something like this:
$memcached = new Memcached('my_session_pool');
if(!count($memcached->getServerList())){
$memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
$memcached->addServer('127.0.0.1', 11211);}
-den
On Saturday, February 15, 2014 12:10:58 PM UTC-8, siva wrote:
>
> Hi
>
> I am using memcached server and using php memcached client and adding
> server using addServer(). After adding server adding data to cache.
> how do i connect to memcached server using php memcached client without
> doing addServer(). Because when I do addServer() it creates duplicate
> servers with same IP which I don't want to happen.
>
> Thanks.
>
--
---
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.