par jdh » 04 Sep 2003 20:18
Sur le site de squid (<!-- BBCode u2 Start --><A HREF="http://www.squid-cache.org/" TARGET="_blank">http://www.squid-cache.org/</A><!-- BBCode u2 End -->)
<BR>
<BR>tu trouves dans la FAQ :
<BR>
<BR><!-- BBCode Start --><I>7.3 I want to restart Squid with a clean cache
<BR>Note: The information here is current for version 2.2.
<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></I><!-- BBCode End -->
<BR>
<BR>J'ai testé la première méthode sur une version 2.4 et 2.5 : cela semble OK.
<BR>
L'intelligence artificielle n'est rien à côté de la stupidité naturelle.