Re: no_chache directive

From: Andrew Smith <ccasmith@dont-contact.us>
Date: Fri, 13 Nov 1998 09:47:35 +1000

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
Received on Thu Nov 12 1998 - 16:39:20 MST

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