Question to Cache::Memcached

Michael Granger ged@FaerieMUD.org
Tue, 8 Jun 2004 15:13:38 -0700


On Jun 8, 2004, at 12:42 PM, Evan Martin wrote:

> I could've sworn Perl exposed its internal hash function that it uses
> for its own hashes--I think the similar languages do.

According to <http://www.perl.com/pub/a/2002/10/01/hashes.html>, the 
algorithm Memcached.pm uses is the one Perl 5.005 used, but it changed 
with 5.61, IIRC. I don't know of any way to use it yourself, however.

Speaking of similar languages, Ruby exposes its hashing function as the 
'hash' method of the Object class, so the Ruby client lib for memcache 
I've been working on by default just does the equivalent of:

   key.hash % buckets.nitems

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/>