Re: [squid-users] Clearing the cache

From: Ric <lists@dont-contact.us>
Date: Sun, 24 Feb 2008 12:10:31 -0800

On Feb 24, 2008, at 4:40 AM, Amos Jeffries wrote:

> Ric wrote:
>> In http://wiki.squid-cache.org/SquidFaq/ClearingTheCache, it says
>> to purge the cache via:
>> squid -k shutdown
>> rm -r /squid/cache/*
>> squid -z
>> squid
>> I've seen elsewhere say to use:
>> squid -k shutdown
>> echo '' > /squid/cache/swap.state
>> squid
>> I like this second one -- it's fast and simple (and less scary than
>> a recursive rm with fumbling fingers). Any problems with it?
>
> Removal of only swap.state causes formally 'undefined' behaviour.
> For now it continues to drop the cache. But there is no guarantee
> that will remain.
>
> As for the scary fumbling: what are you doing erasing the proxy
> cache in the first place? It's a last-resort on severe drive write
> failures!
> Just removing swap.state does not solve that problem.
>
> Amos

In the reverse-proxy case, it's useful to clear the cache once in a
while as you fiddle with cache-control headers or change the site
drastically enough that individual purges are impractical.

Now, if squid should ever support a wildcard/regex purge request --
even if only via command line -- that would be even better. Wildcard
purges and built-in basic url rewriting are two features that make
Varnish very attractive for simple reverse proxy setups.

Ric
Received on Sun Feb 24 2008 - 13:10:35 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:05 MST