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

Reply via email to