Tuesday, April 27, 2010

Step by Step Delete Remove Clear Squid Cache on Linux Fedora System.

1.Check Squid Cache Location.

Check squid cache location on your Linux system. the default location may be at /var/spool/squid directory, but you can use command as show on the example below to check squid cache directory on your system.


cat /etc/squid/squid.conf | grep ^cache_dir
Output
cache_dir ufs /var/spool/squid 4000 16 256

2.Stop squid cache proxy server

3.Create directory and move squid cache file.

Create new directory to temporary store the old squid cache files... why we shoud do this??? the answer... to minimize squid proxy downtime. First we need to create directory and then move the old squid cache file to this directory


mkdir /var/spool/squid/squid_cache_old
mv /var/spool/squid/?? /var/spool/squid/squid_cache_old/
mv /var/spool/squid/swap* /var/spool/squid/squid_cache_old/

4.Start squid with new cache

squid -z

5.Start squid service