Hi all, I have a question about the tick function of RamCacheCLFUS, the code is :
...... e->hits <<= 1; if (e->hits) { e->hits = REQUEUE_HITS(e->hits); lru[1].enqueue(e); } else goto Lfree; ...... I'm confused about the code, it doubles the hit number and then check if the number is zero or not. What's the usage of the doubling ?? It seems the implementation is not the same as the introduction of history list (http://nottheoilrig.com/trafficserver/201408290/arch/cache/ram-cache.en.html), "Each CLOCK the least recently used entry in the History List is dequeued and if the "hits" field is not greater than 1 (it was hit at least once in the History or Cached List) it is deleted, otherwise the "hits" is set to zero and it is requeued on the History List." Am I missing something?? Regards, Huawei Technologies, China Haojun Zhou