md5 as the key

Dustin Sallings dustin at spy.net
Fri Sep 7 23:46:17 UTC 2007


On Sep 7, 2007, at 16:12 , John Kramlich wrote:

> I use Memcache to cache results of MySQL queries.  I've found that  
> using an MD5 hash of the SQL statement works well as the key.  I  
> don't know the probability of issues where two different sets of  
> data will produce the same MD5.  If you find that out please post  
> to the list.

	The expectation is that you'll have a collision after about 2^64  
distinct keys.

-- 
Dustin Sallings




More information about the memcached mailing list