Search squid archive

Re: Clearing the cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sön 2008-02-24 klockan 02:46 -0800 skrev Ric:
> 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?

My preferred method is

cd /squid/cache
mkdir junk
squid -k shutdown
[wait for it to stop]
mv * junk
squid -z
squid
rm -rf junk


Pro/con
+ almost instant
+ disk space reclaimed quickly
+ No / or * in the dangerous rm -rf line
- some more commands to type
- silly warning about not being able to move junk into junk..
- Temporarily a high I/O load while removing the old files.

to avoid the warning you can use the following mv command

  mv swap.state* ?? junk


Or if the cache is on it's own partition, umount it, newfs and mount it
again.

Regards
Henrik

Attachment: signature.asc
Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux