par Mad_Man » 16 Mars 2003 19:42
On trouve ca sur le site de SQUID :
<BR>
<BR><!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-2>En réponse à:</font><HR></TD></TR><TR><TD><FONT SIZE=-2><BLOCKQUOTE>
<BR>I want to restart Squid with a clean cache
<BR>
<BR>First of all, you must stop Squid of course. You can use the command:
<BR>
<BR> % squid -k shutdown
<BR>
<BR>
<BR>The fastest way to restart with an entirely clean cache is to over write the swap.state files for each cache_dir in your config file. Note, you can not just remove the swap.state file, or truncate it to zero size. Instead, you should put just one byte of garbage there. For example:
<BR>
<BR> % echo "" > /cache1/swap.state
<BR>
<BR>Repeat that for every cache_dir, then restart Squid. Be sure to leave the swap.state file with the same owner and permissions that it had before!
<BR>
<BR>Another way, which takes longer, is to have squid recreate all the cache_dir directories. But first you must move the existing directories out of the way. For example, you can try this:
<BR>
<BR> % cd /cache1
<BR> % mkdir JUNK
<BR> % mv ?? swap.state* JUNK
<BR> % rm -rf JUNK &
<BR>
<BR>Repeat this for your other cache_dir's, then tell Squid to create new directories:
<BR> % squid -z
<BR>
<BR> </BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->