md5 as memcached_key

Sergio Bruder bruder at haxent.com.br
Tue Jan 27 02:25:31 MSK 2009


Em 26/01/2009, às 20:47, Geoff Geoff escreveu:

> Dave Cheney wrote:
>> md5 is not guaranteed to be unique, that is to say, two seperate
>> inputs can generate the same hash, so you would need to use extra
>> logic in your application if you wanted to guard against this remote
>> possibility. I'm guessing the problem you are trying to solve is the
>> memcache key has a limitation that is shorter than the possible
>> request_uri ?
>>
>> Cheers
>>
>> Dave
>
> Thanks Dave,
>
> The problem is that memcached will not allow certain characters in the
> key name - so I thought it might be simpler to just store the md5 of  
> the
> actual request_uri.
>
> Thanks,
> Geoff

There are the theoretical chance of colision, yes, but you probably  
can use
it anyway without a practical chance of colision.


Sergio Devojno Bruder
bruder at haxent.com.br
Haxent Consultoria
http://haxent.com.br/
41 3362-1460
41 9933-8764






More information about the nginx mailing list