1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5              This file is generated from xml source: DO NOT EDIT
6        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7      -->
8<title>htcacheclean - Clean up the disk cache - Apache HTTP Server</title>
9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
12<script src="/style/scripts/prettify.js" type="text/javascript">
13</script>
14
15<link href="/images/favicon.ico" rel="shortcut icon" /></head>
16<body id="manual-page"><div id="page-header">
17<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
18<p class="apache">Apache HTTP Server Version 2.2</p>
19<img alt="" src="/images/feather.gif" /></div>
20<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
21<div id="path">
22<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.2</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>htcacheclean - Clean up the disk cache</h1>
23<div class="toplang">
24<p><span>Available Languages: </span><a href="/en/programs/htcacheclean.html" title="English">&nbsp;en&nbsp;</a> |
25<a href="/ko/programs/htcacheclean.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
26<a href="/tr/programs/htcacheclean.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
27</div>
28
29    <p><code>htcacheclean</code> is used to keep the size of
30    <code class="module"><a href="/mod/mod_disk_cache.html">mod_disk_cache</a></code>'s storage within a certain limit. This
31    tool can run either manually or in daemon mode. When running in
32    daemon mode, it sleeps in the background and checks the cache directories
33    at regular intervals for cached content to be removed. You can stop the daemon
34    cleanly by sending it a TERM or INT signal.</p>
35</div>
36<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
37<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
38<li><img alt="" src="/images/down.gif" /> <a href="#exit">Exit Status</a></li>
39</ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="/mod/mod_disk_cache.html">mod_disk_cache</a></code></li></ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
40<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
41<div class="section">
42<h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
43    <p><code><strong>htcacheclean</strong>
44    [ -<strong>D</strong> ]
45    [ -<strong>v</strong> ]
46    [ -<strong>t</strong> ]
47    [ -<strong>r</strong> ]
48    [ -<strong>n</strong> ]
49    -<strong>p</strong><var>path</var>
50    -<strong>l</strong><var>limit</var></code></p>
51
52    <p><code><strong>htcacheclean</strong>
53    [ -<strong>n</strong> ]
54    [ -<strong>t</strong> ]
55    [ -<strong>i</strong> ]
56    -<strong>d</strong><var>interval</var>
57    -<strong>p</strong><var>path</var>
58    -<strong>l</strong><var>limit</var></code></p>
59</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
60<div class="section">
61<h2><a name="options" id="options">Options</a></h2>
62    <dl>
63    <dt><code>-d<var>interval</var></code></dt>
64    <dd>Daemonize and repeat cache cleaning every <var>interval</var> minutes.
65    This option is mutually exclusive with the <code>-D</code>, <code>-v</code>
66    and <code>-r</code> options. To shutdown the daemon cleanly, just send it
67    a <code>SIGTERM</code> or <code>SIGINT</code>.</dd>
68
69    <dt><code>-D</code></dt>
70    <dd>Do a dry run and don't delete anything. This option is mutually
71    exclusive with the <code>-d</code> option.</dd>
72
73    <dt><code>-v</code></dt>
74    <dd>Be verbose and print statistics. This option is mutually exclusive
75    with the <code>-d</code> option.</dd>
76
77    <dt><code>-r</code></dt>
78    <dd>Clean thoroughly. This assumes that the Apache web server is
79    not running (otherwise you may get garbage in the cache). This option
80    is mutually exclusive with the <code>-d</code> option and implies
81    the <code>-t</code> option.</dd>
82
83    <dt><code>-n</code></dt>
84    <dd>Be nice. This causes slower processing in favour of other
85    processes. <code>htcacheclean</code> will sleep from time to time
86    so that (a) the disk IO will be delayed and (b) the kernel can schedule
87    other processes in the meantime.</dd>
88
89    <dt><code>-t</code></dt>
90    <dd>Delete all empty directories. By default only cache files are
91    removed, however with some configurations the large number of
92    directories created may require attention. If your configuration
93    requires a very large number of directories, to the point that
94    inode or file allocation table exhaustion may become an issue, use 
95    of this option is advised.</dd>
96
97    <dt><code>-p<var>path</var></code></dt>
98    <dd>Specify <var>path</var> as the root directory of the disk cache. This
99    should be the same value as specified with the <code class="directive"><a href="/mod/mod_disk_cache.html#cacheroot">CacheRoot</a></code> directive.</dd>
100
101    <dt><code>-l<var>limit</var></code></dt>
102    <dd>Specify <var>limit</var> as the total disk cache size limit. The value
103    is expressed in bytes by default (or attaching <code>B</code> to the
104    number). Attach <code>K</code> for Kbytes or <code>M</code> for
105    MBytes.</dd>
106
107    <dt><code>-i</code></dt>
108    <dd>Be intelligent and run only when there was a modification of the disk
109    cache. This option is only possible together with the <code>-d</code>
110    option.</dd>
111    </dl>
112</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
113<div class="section">
114<h2><a name="exit" id="exit">Exit Status</a></h2>
115    <p><code>htcacheclean</code> returns a zero status ("true") if all
116    operations were successful, <code>1</code> otherwise.</p>
117</div></div>
118<div class="bottomlang">
119<p><span>Available Languages: </span><a href="/en/programs/htcacheclean.html" title="English">&nbsp;en&nbsp;</a> |
120<a href="/ko/programs/htcacheclean.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
121<a href="/tr/programs/htcacheclean.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
122</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
123<script type="text/javascript"><!--//--><![CDATA[//><!--
124var comments_shortname = 'httpd';
125var comments_identifier = 'http://httpd.apache.org/docs/2.2/programs/htcacheclean.html';
126(function(w, d) {
127    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
128        d.write('<div id="comments_thread"><\/div>');
129        var s = d.createElement('script');
130        s.type = 'text/javascript';
131        s.async = true;
132        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
133        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
134    }
135    else { 
136        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
137    }
138})(window, document);
139//--><!]]></script></div><div id="footer">
140<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
141<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
142if (typeof(prettyPrint) !== 'undefined') {
143    prettyPrint();
144}
145//--><!]]></script>
146</body></html>