Hi!

What about doing something like this?

$m = new Memcached();
$m->addServer('localhost', 11211);

foreach ($array as $server) {
     $m->setByKey('api-cache', 'block-ip:169.254.253.252',
$server['id']);
}

Would that be a better idea?
Remember, I am not going to fill up my memcached server like this :)

On 25 Maj, 23:39, Brian Moon <[email protected]> wrote:
> That is not super helpful however for users of pecl/memcached.
>
>  From Andrei's blog:
>
> "I m working on next version (2.0) of the memcached extension. It ll
> have UDP support and replication (failover)."
>
> May want to dig into the gitub repo for 
> it.http://github.com/andreiz/php-memcached
>
> Brian.
> --------http://brian.moonspot.net/
>
> On 5/25/10 4:34 PM, Eric Lambert wrote:
>
> > Hi Jay:
>
> > Trond Norbye, who added this feature into libmemcached, wrote a blog
> > entry describing how to use libmecached for replication. You can find it
> > athttp://blogs.sun.com/trond/entry/replicate_your_keys_to_multiple
>
> > Good luck
>
> > Eric
> > Jay wrote:
> >> Hi Brian,
>
> >> I don't know if you have received my last message here. Written a
> >> couple of times on here, but nothing appears (checked in after few
> >> hours after original write to verify, but no).
>
> >> I have searched under every rock I could find (read googled like
> >> hell), but haven't found any information or documentation about
> >> replica functions in libmemcached / PECL memcached?
>
> >> Would you mind telling me more about it?
> >> Thanks!
>
> >> On 24 Maj, 02:39, Brian Aker <[email protected]> wrote:
> >>> Hi!
>
> >>> On May 23, 2010, at 3:11 PM, Jay wrote:
>
> >>>> What is common sense to do in this case, when certain keys need to be
> >>>> stored on ALL servers for reliability
> >>> For libmemcached turn on replica, and set it to the number of hosts
> >>> you have.
>
> >>> Cheers,
> >>> -Brian

Reply via email to