memcache中的key为什么要用md5处理

官方的说法是:

“A few years ago, we decided to md5 all of our cache keys. We did this because at the time memcached (which is what memcachedb is based on) could only take keys of a certain length. In fact, the version it is based on still has this limitation. MD5ing the keys was a good solution to this problem, so we thought.”

主要是为了让key有一个固定的长度,方便索引。

 

memcached 协议:

http://www.cnblogs.com/kevintian/articles/1197681.html

 

http://wiki.chenlb.com/solr/doku.php

你可能感兴趣的:(memcache)