namespace bids

Cahill, Earl ecahill at corp.untd.com
Fri Feb 3 17:53:44 UTC 2006


> Our scheme is simple:     namespace.key

We do something similar.

> Then you just get the list of keys from the
> anchor key, and walk down the list deleting the appropriate keys.  

I don't know how to get a list of all the keys.  I tried doing

stats slabs

    foreach my $slab (@$slabs) {
        my $slab_dump = $mc->_oneline($sock, "stats cachedump
$slab\r\n");
        while($slab_dump =~ /^ITEM\s+(\S+)/mg) {
            $ref->{$1} = $mc->get($1);
        }
    }

But I guess the cachedump doesn't return everything on the slab.  With
the code above I wanted to see the values, so I just did a get.  If
someone has a way to walk all the keys, then yeah, that would pretty
well solve my 'fred' problem, where changes only happen every few weeks,
and I am ok if the process takes a few minutes to complete.

Earl


More information about the memcached mailing list