Search squid archive

RE: Simple command for purging entire cache?

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

 



Morten

Assuming your cache directories are in the directory /var/squid/cache and
you're running a UNIX/LINUX system, the command "rm -rf /var/squid/cache/ &"
will work just fine.  But before restarting squid, you must recreate the
cache directories with the command squid -z.

I automate the process by using the following commands in a script:
#Stop squid services
/etc/opt/squid/sbin/squid -k shutdown
#Wait 30 seconds for all squid processes to stop
sleep 30
#Change to squid cache directory
cd /squidcache
#Remove squid cache
rm -rf *
#Recreate squid cache directories
/etc/opt/squid/sbin/squid -z
#Restart squid
/etc/opt/squid/sbin/squid -s -f /etc/opt/squid/etc/squid.conf

You'll have to modify this script to fit your particular installation.

Hope this helps

Bob Morrison
Network Administrator
Wallingford CT Public Schools USA


-----Original Message-----
From: Morten W. Petersen [mailto:morten@xxxxxxxxxxxxxx] 
Sent: Monday, January 16, 2006 9:34 AM
To: squid-users@xxxxxxxxxxxxxxx
Subject:  Simple command for purging entire cache?

Hi,

I was wondering if anyone know of a way to purge the entire cache in one 
go..  any suggestions?

Thanks,

Morten

-- 
Morten W. Petersen

Email: morten@xxxxxxxxxxxxxx
Phone: +47 45 44 00 69
Title: Project manager

Nidelven IT (http://www.nidelven-it.no)
We provide Zope/Plone hosting and consulting


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

  Powered by Linux