Great system.. two questions though..
Allen
memcached at rfnj.org
Thu Mar 30 15:51:13 UTC 2006
First the system details.. running memcached 1.1.12_2 (latest 'ports'
version) on FreeBSD 6, and using the CPAN memcached library for perl,
v1.15.
Question one is sort of silly, or struck me as silly anyway.. When I
try to use 0 (zero) as the RHS on a key, it lets me set(), but the
get() always returns a failure.. is that a known bug? Fixed in a newer
version? Something I just shouldn't do? For example:
#----------
#!/usr/bin/perl -w
use Cache::Memcached;
use strict;
my $memd = Cache::Memcached->new({servers => ["localhost:11211"]});
$memd->set("foo:0", 'foo0') || die ("Error 1\n");
my $foo = $memd->get("foo:0") || die ("Error 2\n");
#----------
Always dies on the "Error 2" line. $foo is returned undefined.
Question two is more of an architechtural one. If I define multiple
servers in the Memcached object, and do a set(), does it update the
value on ALL the backend servers, pick one at random, or what?
Likewise if you get() in that situation, does it try all the servers
before failing, or is there some other system at play here?
Thanks for any answers, and I have to say, this is an awesome project.
I've been looking for something to replace all my sem*() and shm*()
stuff for ages, it's such a pain in the neck to use.
More information about the memcached
mailing list