Thursday, September 12, 2013

Clearing Squid cache

I ran into some problems and found out that the cache was the culprit. After reading a few documentation which differs from one another on which is the right way to clear the cache, and after performing them myself, I found that the following is the best way

1. Find out where your Squid is storing the cache. Different distro saves in a different location. To do this, look in the /etc/squid/squid.conf file and search for 'cache' line.

2. Stop squid

3. Remove Squid cache content from the folder eg rm -rf /var/spool/squid/*

4. Recreate the cache internal folders with the Squid script - squid -z

5. Restart Squid.