A reference count is not the same thing as the number of times an item
has been accessed. The two have nothing to do with each other.
"Reference count" is a computer science term:
http://en.wikipedia.org/wiki/Reference_count
Look at the source code again and pay specific attention to when the
reference count gets incremented and decremented, and perhaps the
purpose will become clearer.
-Steve
John.H wrote:
I have read the source code of memcached,and I found it only free the
item whose refcount is 0
But if I have visited every item in the memcahced,so no item's
refcount is 0,so no item will be removed even the LRU is turn on?
So when will the item be removed?