Hi,
Alexander Grüner wrote:
was wondering if there were a way to tell squid to clean cache
periodicaly?! So I would not have to do it myself.
I am doing this with a cron job in the middle of the night. You might
adjust your paths perhaps. Downtime is just about a few seconds.
Works on SuSE Linux 9.2:
#!/bin/sh
#
# delete Squid Cache
# Alexander Grüner
#
#
killall -9 squid
rm /var/run/squid.pid
mv /var/cache/squid /var/cache/squid.old
mkdir /var/cache/squid
chown squid:root /var/cache/squid
squid -z 2>&1 | grep -v "Creating Swap"
rcsquid start 2>&1 | grep -v done
rm -rf /var/cache/squid.old
Perhaps there is even a better idea ?
Surely this defeats the object of having a cache! Why not just run
without squid? If you need it for logging, just use a null cache_dir!
If you're having problems with it growing too large then set cache_dir
appropriately!
Maybe I've missed something but I really can't see the point in this. I
currently have three 9Gb spindles running at 6.9Gb each and I'd hate to
clear them!
Neil.
--
Neil Hillard hillardn@xxxxxxxxx
Westland Helicopters Ltd. http://www.whl.co.uk/
Disclaimer: This message does not necessarily reflect the
views of Westland Helicopters Ltd.