The disk cache is a cyclone buffer, although it does have provision for evacuating documents, I am not sure that code has been tested recently.  If you "pin" documents, then they will be rewritten behind "head" of writes so that they are never not present in the cache. There is also provision to evacuate documents which get a hit in the second half of the cache (1/2 way to being overwritten).    This feature is not enabled by default however.  In general, for popular documents there is a strong temporal component, so this "replacement" policy works out pretty well in practice.

john

On Wed, May 9, 2012 at 8:34 PM, Leif Hedstrom <zwoop@apache.org> wrote:
On 5/9/12 9:28 PM, James Peach wrote:
On 09/05/2012, at 6:26 PM, shahab bakhtiyari wrote:

Hi guys

I have a question which is not exactly technical but more theoretical. I couldnt find it in documentations though.
The question is what kind replacement algorithm (policy) the traffic server is using ?  I  mean is that recency based like LRU  or frequency based like LFU or ... ?

Would appreciate also links to documents if any ?
This might be useful: https://cwiki.apache.org/confluence/display/TS/RamCache

J

 Yeah, the RAM cache has a couple of algorithms, including LRU. The disk cache has really no replacement policy, it's basically "FIFO" (but, it won't blindly throw out objects).

-- Leif