On Apr 6, 7:11 pm, Tuyan <[email protected]> wrote:
> Hi,
>
> On Apr 6, 2:38 pm, Jay Paroline <[email protected]> wrote:> Currently we 
> are (still) stuck using the PECL memcache extension, but
> > hopefully soon we will be moving to the libmemcached based PECL
> > memcached extension. I am trying to figure out if there is any way to
> > set it up to use persistent/shared connections.
>
> > Unfortunately I haven't been able to find any info about this in the
> > memcached extension. Can anyone shed some light on whether this is
> > possible and if so, how?
>
> Just give a string parameter to the memcached constructor , any class
> instance with the same string as parameter should use the same
> connection.
>
> /tyn

Yeah, only thing to watch out for is not to add the servers more than
once.

$memCached = new MemCached('MyApp');
if ($memCached->isPristine())
{
        $memCached->addServer(...);
        ...
}

Jared



-- 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to