Re: Efficient way of enumerating squid contents?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 09 Oct 1998 08:31:11 +0200

Chris Wedgwood wrote:
>
> As best as I can see - there is no easy way without walking the list
> of all squid objects to determine which objects match a particular
> pattern?

No. Squid 2 does not keep the URLs in memory. Only URL hashes are in
memory, and hashes are not well suited for pattern matching.

You have to walk the hash chains and swap in the headers of every object
to do such an operation.

> I can see anywhere this would screw anything legitimate up, assuming
> the case_fold_* directives are used properly - can anyone else?

Very hard to tell. There are strong reasons why HTTP 1.1 does not allow
a proxy to change the URL in any way.

Why do you want to change case of URLs or header information?

If you want to clean up URLs to gain a higher hit ratio then this can
easily be done in a redirector, but you should take exctreme caution
when doing things like this as different case is different on many
servers (all UNIX based for example) so there is no guarantee that .asp
and .ASP is the same thing.

/Henrik
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