|
System administration, processes administration, jobs, cron, resources, limits, shells, ssh, telnet.
Author |
Message |
mandrei99
|
 |
Post subject: How to clear and initialize squid cache | Posted: Thu Jan 08, 2015 5:29 am |
|
Joined: Tue Aug 04, 2009 9:16 am Posts: 250
|
How to clear and initialize squid cache
Whenever squid cache directory gets too large that it no longer fits the filesystem designated to it, I usually stop squid, delete the whole cache, reinitialize squid cache and start squid. man squid quote: Quote: -z Create missing swap directories and other missing cache_dir structures, then exit. All cache_dir types create the con- figured top-level directory if it is missing. Other actions are type-specific. For example, ufs-based storage systems create missing L1 and L2 directories while Rock creates the missing database file.
This option does not enable validation of any present swap structures. Its focus is on creation of missing pieces. If nothing is missing, squid -z just exits. If you suspect cache_dir corruption, you must delete the top-level cache_dir directory before running squid -z.
By default, squid -z runs in daemon mode (so that configu- ration macros and other SMP features work as expected). Use -N option to overwrite this. Code: # service squid stop # rm -rf /var/squid/cache # squid -z # service squid start
This can create unexpected behavior so please make sure you know what you need to do.
|
|
|
|
|
|
|
Users browsing this forum: No registered users and 1 guest |
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
 News Site map SitemapIndex RSS Feed Channel list
|
|