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

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

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

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


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:
-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.

# 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.

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




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




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 ]