Search squid archive

Re: Howto Clear Cache Periodicaly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux