I might be reading all this wrong, but couldnt you just set the max
cache size lower?
Alexander Grüner wrote:
Hi :-)
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 ?
Regards,
Alexander