We're using Squid as a Web accelerator and need to clear the cache every 
morning (the store goes into maintenance mode at 4 a.m. and all pages 
have a message saying so; we don't want those pages cached).
Based on FAQ 7.3 (http://www.squid-cache.org/Doc/FAQ/FAQ-7.html#ss7.3), 
I wrote this script to clear my Squid cache:
/usr/local/squid2/sbin/squid -k shutdown
echo "" > /cache/swap.state
/etc/init.d/squid start
This works but it sometimes has problems. Most of the times I've run it, 
it works great.  However, sometimes when I run it, it says there are no 
running instances of Squid, and then subsequently Squid doesn't start 
up.  Any ideas on why this might be? I have been running the script a 
few times in a row, which might be part of the problem ... could it just 
be that I'm not giving it enough time before running it again, or could 
something else be at work?
Also, does anyone have suggestions on causing a certain set of URLs to 
not be cached during a certain time of night? My idea right now is to 
have two squid.conf files -- one that includes the URLs affected by 
maintenance mode and one that doesn't include them -- and setting up 
cron jobs to switch between config files before and after the 
maintenance period.
Thanks!
Jen
Received on Mon Feb 07 2005 - 15:31:34 MST
This archive was generated by hypermail pre-2.1.9 : Tue Mar 01 2005 - 12:00:01 MST