Starting squid with a clean cache

Squid is an open source web proxy cache designed to run on Unix machines. Squid caches repeated requests thus increasing performance. But in some situations you will want to start Squid with an entirely clean cache. This tip will show you how.

First of all stop Squid and then…

echo ” ” > /path/to/squid/caches/swap.state

Now restart Squid and your done!

Note that you should repeat the above for every directory defined in the cache_dir option within squid.conf.

3 Responses to “Starting squid with a clean cache”

  1. anonymous says:

    On the versions of squid that we are running internally we can flush them just by doing squid with the -z syntax to recreate the swap partitions.

    exter_c

  2. anonymous says:

    Using the -z options to clean the cache is slower though, as it need to recreate all the cache directory.

    Alveden

  3. ehcache.net says:

    Starting squid with a clean cache…

    First of all stop Squid and then… echo ” ” > /path/to/squid/caches/swap.state Now restart Squid and your done!…

Leave a Reply

You must be logged in to post a comment.