Re: [squid-users] How do I clear the cache database without stopping squid?

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Fri, 21 Jun 2013 16:26:39 +0300

On 06/21/2013 02:45 PM, Daniele Segato wrote:
> Hi,
>
> is there a way to clear the cache without stopping / rebooting squid?
>
> I usually stop squid, remove the caches from the filesystem (rm -rf
> /path/where/the/cache/is), restart squid.
>
> Is there a way to clear that cache without the restart?
>
> Thanks,
> Daniele Segato
you can do a small tick if you want to just reload down times.

change the conf file to no cache_dir at all.
reload squid
then erase manually the cache_dir.
after that just run another squid.conf file with the settings of the
cache_dir in it with a -z option.
squid -f /etc/squid/squid_res.conf -z

now you got squid running with no shutdown but without cache_dir.
The cache dir also was erased and initialized.
you only need to change back the original conf file and then reload the
settings again.

Hope the recipe will help you.

Eliezer
Received on Fri Jun 21 2013 - 13:27:01 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 25 2013 - 12:00:06 MDT