How does Nginx look-up cached resource?

Shuxin Yang shuxinyang.oss at gmail.com
Fri Sep 4 01:39:49 UTC 2015


Hi, There:

     I'm Nginx newbie. I have a question regarding how nginx lookup a 
cached resource.

     As far as I can tell, given a cache-key k. Nginx uses crc32(k) as 
as the key to lookup
the cached resource in a RB tree, and use md5(k) verify if conflict take 
place; the
key k per se is not used for looking up resource. Is my understanding 
correct?
If so, how can we guarantee that crc32 and md5 combined can uniquely 
identify a resource?

Thanks
Shuxin



More information about the nginx-devel mailing list