Re: [SQU] lru or heap LRU (Squid V2.4)

From: Henrik Nordstrom <>
Date: Thu, 4 Apr 2002 09:05:54 +0200

On Thursday 04 April 2002 03:19, wrote:

> Can you please suggest me one more algorithm other than LFU and
> GDS using the heap based policy engine in the squid?

Squid can support any policy being based on what you have in the
StoreEntry structure:

    time_t timestamp;
    time_t lastref;
    time_t expires;
    time_t lastmod;
    size_t swap_file_sz;
    u_short refcount;
    u_short flags;

Plus frequency of use etc..

The heap engine can in theory sustain any policy where you can
formulate a algorithm giving the objects ordered integers telling
their removal priority.

With a little hackery you can add more paramaters, but you will then
need to extend StoreEntry and swap.state with storage for this if the
additional parameter is of such nature that it needs to be remembered
when you restart Squid.

Received on Thu Apr 04 2002 - 00:33:25 MST

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