Re: no_chache directive

From: Andrew Smith <ccasmith@dont-contact.us>
Date: Mon, 16 Nov 1998 10:11:07 +1000

Actually it worked for Squid 2.0 patch2, but that is because it recursed through the cache objects
themselves. Yes it took a while, but it didn't slow down Squid very much, and we have very busy
proxies. I suspect strings would be faster than doing it in Perl, but I didn't check.

Andrew.

Mark Reynolds wrote:
>
> Which version of squid will this work for? Version 1 I'd bet.
> I can't seeing this working with version 1.2/2 as the
> swap.state file is no longer a simple text file.
>
> If anyone had a version 1.2/2 method, I think it would be
> interesting and useful for many people.
>
> At 09:47 13/11/98 +1000, you wrote:
> >Hello,
> >We had this problem. This is probably a silly way to do it, but it worked
> for us in an emergency:
> >
> >#!/usr/bin/sh
> >set -x
> >find /cache* -type f -exec strings {} \; | egrep
> '^http:.*(cgi-bin|\?|\.asp).*' | \
> >tee -a /usr/local/squid/logs/purge_cgi.list | sed -e 's/./\\&/g' | \
> >xargs -i /usr/local/squid/bin/client -v -p 80 -m PURGE {} \
> >>> /usr/local/squid/logs/purge_cgi.log 2>&1
> >
> >
> >You would need to change a few things for your local setup, such as
> /cache*, the egrep pattern, the
> >'-p 80' for your cache port, and your session log locations. This takes a
> while to run.
> >There is probably a better way to do this.
> >
> >Regards,
> >Andrew.
> >
> >
> >Martin Bene wrote:
> >>
> >> If I add an expression to the no_cache tag in squid.conf, this works for
> >> new urls which match the expression. However, there is a problem with
> >> objects already IN the cache which match the new extression - they still
> >> get served out from the cache instead of being fetched directly from the
> >> server.
> >>
> >> Any idea how I can purge all objects matching the no_ache acls from my
> cache?
> >>
> >> Thanks, Martin
> >>
> >> --------------------------------------------------
> >> Martin Bene vox: +43-664-3251047
> >> simon media fax: +43-316-813824-6
> >> Andreas-Hofer-Platz 9 e-mail: mb@sime.com
> >> 8010 Graz, Austria
> >> --------------------------------------------------
> >> finger mb@mail.sime.com for PGP public key
> >
> >--
> >Dr. Andrew Smith Any OPINIONS expressed are
> >Network Development mine and do not necessarily
> >Prentice Centre reflect the views of the
> >University of Queensland University of Qld.
> >Australia, 4072.
> >
> >email: ccasmith@prentice.uq.edu.au
> >phone: 07 336 57408
> >
> >

-- 
Dr. Andrew Smith                     Any OPINIONS expressed are
Network Development                  mine and do not necessarily
Prentice Centre                      reflect the views of the
University of Queensland             University of Qld.
Australia, 4072.
email: ccasmith@prentice.uq.edu.au
phone: 07 336 57408
Received on Sun Nov 15 1998 - 16:55:26 MST

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