Re: Efficient way of enumerating squid contents?

From: Chris Wedgwood <chris@dont-contact.us>
Date: Mon, 12 Oct 1998 10:00:10 +1300

On Sat, Oct 10, 1998 at 07:18:46AM +0200, Henrik Nordstrom wrote:

> Hmm.. the closest one is perhaps the cache validation that takes
> place after the old index file is loaded... it is a "background"
> process walking throught the whole cache one object at a time,
> doing blocking operations disk on that object.

OK, thanks... I'll take a look at that then.

I though the revalidation code only processes the files in the swap
was trashed, otherwise it would just perform a consistency check
between multiple swaps?

> If you want it quick, then you have to somehow keep the URLs in
> memory which we don't since it requires a little bit to much memory
> for most uses.

Many people will argue, keeping the URLs in memory is a step
backwards. There are advantages and disadvantages to both keeping
them in memory and only keeping a hash.

After more thought, I think the size advantage of keeping only the
hash (and the fact hashed have nice distributions for adding to
various data-structures such as trees) are too great when weighed
against the ability to quickly purge pages based upon a regex (which
will rarely happen).

> Yes, but this can easily be "fixed" by using a redirector that
> rewrites the URLs according to some ruleset. I see no need to add
> this to Squid.

A redirector only sees the URLs, not the full headers - you need the
Server: header in many cases to determine whether its a sane OS or
some kind of lame Win32 or MacOS system your talking to.

> Why do you want to change case in header information?

Because many people when linking to M$ files can't TyPe properly and
I see mixed case reqeusts for the same object.

-cw
Received on Tue Jul 29 2003 - 13:15:54 MDT

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