Re: squid disk cache replacement policy

From: Brian Beuning <bbeuning@dont-contact.us>
Date: Mon, 03 May 1999 21:28:02 -0400

The thing that is bugging me is that the replacement ignores the
refresh_pattern rules. So if all my rules say to ignore_expire,
the LRU continues to remove storeEntry's based on their expiration
date, even though if a browser asked for those pages they would
be considered "fresh" and returned to the browser.

I am trying a change to storeCheckExpired() to call refreshCheck()
with a delta of storeExpiredReferenceAge(). Does this sound
plausible?

Thanks,
Brian Beuning

Henrik Nordstrom wrote:

> Brian Beuning wrote:
> >
> > Thanks for the pointer, I saw that code but wasn't sure it was
> > the right place. I guess I need to track down how store_list
> > is maintained.
>
> store_list is an LRU list of all objects in the cache. Each time an
> object is accessed it is moved to the head of the list, and
> storeMaintainSwapSpace looks at the tail.
>
> > I use squid with wget as my personal web cache. What is not
> > working right, is pages that wget pulled into the cache recently
> > (within the last one or two days) often get purged before pages
> > which have not been accessed for much longer.
>
> It may be caused by "staleness", and not really cache replacement. Check
> the pages headers (look for Expires, Last-Modified and no-cache) and
> your refresh_pattern.
>
> Also, changing the replacement policy to pure LRU may make a difference.
> At least it will make it easier to understand what is going on.
>
> How:
>
> Change
> } else if (storeCheckExpired(e)) {
> to
> } else {
>
> --
> Henrik Nordstrom
> Spare time Squid hacker
Received on Mon May 03 1999 - 19:10:34 MDT

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