Re: storeGetSwapSpace

From: Henrik Nordstrom <>
Date: Thu, 05 Mar 1998 08:06:07 +0100

Yee Man Chan wrote:
> So, this is not a pure LRU, right? If I want to do pure LRU, pure LFU,
> pure SIZE, etc, I have to build my own list of storeEntry, correct?

No it is not pure LRU, it is a combination of LRU and Expired. It is two
separate checks in storeCheckExpired. First it checks if it has expired,
then if it should be LRU removed.

If you can build a statistics model to determine if the object should be
removed, then all you have to to is to change storeMaintainSwapSpace to
call another function than storeCheckExpired. If you want to change the
LRU to LFU or something else, but keep that exipred objects are removed,
then the change is in storeCheckExpired.

If you can't find a stastitics modlel to determine when a object should
be removed, then you may need to build your own lists.

> By the way, when will storeGetSwapSpace get called with a
> positive (>0) argument?

Never. It is historic.

Henrik Nordström
Sparetime Squid Hacker
Received on Wed Mar 04 1998 - 23:24:02 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:09 MST