Hi guys,

Does memcached do some kind of open hashing, so that multiple objects
could be stored for the same hash key? This should be so, otherwise
memcached would be returning incorrect data.

My use case is as follows. I am inserting a large number of unique
keys into memcache. The server has sufficient memory to hold all the
keys. However, when I check the stats on the server, the number of
current items is less than the total number of keys inserted
( difference of 171 / ~5 million ). As far as I am aware, this could
mean two things;
1. there are hash collisions and the current items only display the
number of unique hashes stored.
2. The data that I inserted is not there anymore and has been evicted
( while inserting the timeout was 30 days, all the testing was done in
a matter of hours)

Now if I try to retrieve all my  keys, I never get a cache miss. So
either its storing all the keys (inspite of the stats showing fewer
items) and returning me the right object, or its returning an
incorrect object for some of the keys. Which one is it?

Thanks for your help.
Regards,
Ajeet

Reply via email to