Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Wed Dec 06, 2023 9:08 am


System administration, processes administration, jobs, cron, resources, limits, shells, ssh, telnet.

Author Message
mandrei99
Post  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

Offline
 

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.





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "How to clear and initialize squid cache"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Squid clear cache on FreeBSD

mandrei99

0

4061

Mon Mar 03, 2014 7:37 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux clear screen / terminal

mandrei99

2

9136

Wed Mar 04, 2015 8:52 am

Guest View the latest post

 

Who is online
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
Jump to:  
cronNews News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO