Re: Store Manager

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 27 Oct 2005 22:54:39 +0200 (CEST)

On Tue, 25 Oct 2005, wellington ricardo gasparin wrote:

> I donīt understand how the Squid make store objects when the cache is
> full, who store is the replacement algorithm?

Squid does not allow the cache to become entirely full. It calls the
selected removal policy to select candidates for removal from the cache
before it's full..

The interface used between the core Squid and the removal policy algorithm
is documented in the programmers guide. The basic principles are very
simple

    * Object added
    * Object removed
    * Object referenced/dereferenced
    * Give me candidates for removal from the cache (iterator)
    * Iterate over all the object known to the policy (iterator)

http://www.squid-cache.org/Doc/Prog-Guide/prog-guide-12.html#ss12.9

The first three provide input to the removal policy allowing it to keep
track of the objects.

the fourth is used when reclaiming space in the cache

the last when saving the index, allowing the policy to order the saved
entries in such manner that the policy is mostly preserved on reload. For
example in the LRU policy the object index gets saved in LRU order.

Regards
Henrik
Received on Thu Oct 27 2005 - 14:54:42 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Nov 01 2005 - 12:00:07 MST