]> granicus.if.org Git - apache/blob - docs/manual/programs/htcacheclean.html.en
Rebuild generated files.
[apache] / docs / manual / programs / htcacheclean.html.en
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" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body id="manual-page"><div id="page-header">
14 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
15 <p class="apache">Apache HTTP Server Version 2.3</p>
16 <img alt="" src="../images/feather.gif" /></div>
17 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
18 <div id="path">
19 <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.3</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>htcacheclean - Clean up the disk cache</h1>
20 <div class="toplang">
21 <p><span>Available Languages: </span><a href="../en/programs/htcacheclean.html" title="English">&nbsp;en&nbsp;</a> |
22 <a href="../ko/programs/htcacheclean.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
23 <a href="../tr/programs/htcacheclean.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
24 </div>
25
26     <p><code>htcacheclean</code> is used to keep the size of
27     <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code>'s storage within a certain limit. This
28     tool can run either manually or in daemon mode. When running in
29     daemon mode, it sleeps in the background and checks the cache directory
30     at regular intervals for cached content to be removed. You can stop the daemon
31     cleanly by sending it a TERM or INT signal. When run manually, a once off
32     check of the cache directory is made for cached content to be removed. If
33     one or more URLs are specified, each URL will be deleted from the cache, if
34     present.</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="#delete">Deleting a specific URL</a></li>
39 <li><img alt="" src="../images/down.gif" /> <a href="#exit">Exit Status</a></li>
40 </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></div>
41 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
42 <div class="section">
43 <h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
44     <p><code><strong>htcacheclean</strong>
45     [ -<strong>D</strong> ]
46     [ -<strong>v</strong> ]
47     [ -<strong>t</strong> ]
48     [ -<strong>r</strong> ]
49     [ -<strong>n</strong> ]
50     [ -<strong>R</strong><var>round</var> ]
51     -<strong>p</strong><var>path</var>
52     -<strong>l</strong><var>limit</var></code></p>
53
54     <p><code><strong>htcacheclean</strong>
55     [ -<strong>n</strong> ]
56     [ -<strong>t</strong> ]
57     [ -<strong>i</strong> ]
58     [ -<strong>P</strong><var>pidfile</var> ]
59     [ -<strong>R</strong><var>round</var> ]
60     -<strong>d</strong><var>interval</var>
61     -<strong>p</strong><var>path</var>
62     -<strong>l</strong><var>limit</var></code></p>
63
64     <p><code><strong>htcacheclean</strong>
65     [ -<strong>D</strong> ]
66     [ -<strong>v</strong> ]
67     [ -<strong>t</strong> ]
68     [ -<strong>R</strong><var>round</var> ]
69     -<strong>p</strong><var>path</var>
70     <var>url</var></code></p>
71 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
72 <div class="section">
73 <h2><a name="options" id="options">Options</a></h2>
74     <dl>
75     <dt><code>-d<var>interval</var></code></dt>
76     <dd>Daemonize and repeat cache cleaning every <var>interval</var> minutes.
77     This option is mutually exclusive with the <code>-D</code>, <code>-v</code>
78     and <code>-r</code> options. To shutdown the daemon cleanly, just send it
79     a <code>SIGTERM</code> or <code>SIGINT</code>.</dd>
80
81     <dt><code>-D</code></dt>
82     <dd>Do a dry run and don't delete anything. This option is mutually
83     exclusive with the <code>-d</code> option.</dd>
84
85     <dt><code>-v</code></dt>
86     <dd>Be verbose and print statistics. This option is mutually exclusive
87     with the <code>-d</code> option.</dd>
88
89     <dt><code>-r</code></dt>
90     <dd>Clean thoroughly. This assumes that the Apache web server is
91     not running (otherwise you may get garbage in the cache). This option
92     is mutually exclusive with the <code>-d</code> option and implies
93     the <code>-t</code> option.</dd>
94
95     <dt><code>-n</code></dt>
96     <dd>Be nice. This causes slower processing in favour of other
97     processes. <code>htcacheclean</code> will sleep from time to time
98     so that (a) the disk IO will be delayed and (b) the kernel can schedule
99     other processes in the meantime.</dd>
100
101     <dt><code>-t</code></dt>
102     <dd>Delete all empty directories. By default only cache files are
103     removed, however with some configurations the large number of
104     directories created may require attention. If your configuration
105     requires a very large number of directories, to the point that
106     inode or file allocation table exhaustion may become an issue, use 
107     of this option is advised.</dd>
108
109     <dt><code>-p<var>path</var></code></dt>
110     <dd>Specify <var>path</var> as the root directory of the disk cache. This
111     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>
112
113     <dt><code>-P<var>pidfile</var></code></dt>
114     <dd>Specify <var>pidfile</var> as the name of the file to write the
115     process ID to when daemonized.</dd>
116
117     <dt><code>-R<var>round</var></code></dt>
118     <dd>Specify <var>round</var> as the amount to round sizes up to, to
119     compensate for disk block sizes. Set to the block size of the cache
120     partition.</dd>
121
122     <dt><code>-l<var>limit</var></code></dt>
123     <dd>Specify <var>limit</var> as the total disk cache size limit. The value
124     is expressed in bytes by default (or attaching <code>B</code> to the
125     number). Attach <code>K</code> for Kbytes or <code>M</code> for
126     MBytes.</dd>
127
128     <dt><code>-i</code></dt>
129     <dd>Be intelligent and run only when there was a modification of the disk
130     cache. This option is only possible together with the <code>-d</code>
131     option.</dd>
132     </dl>
133 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
134 <div class="section">
135 <h2><a name="delete" id="delete">Deleting a specific URL</a></h2>
136     <p>If <code>htcacheclean</code> is passed one or more URLs, each URL will
137     be deleted from the cache. If multiple variants of an URL exists, all
138     variants would be deleted.</p>
139
140     <p>When a reverse proxied URL is to be deleted, the effective URL is
141     constructed from the <strong>Host</strong> header, the
142     <strong>port</strong>, the <strong>path</strong> and the
143     <strong>query</strong>. Note the '?' in the URL must always be specified
144     explicitly, whether a query string is present or not. For example, an
145     attempt to delete the path <strong>/</strong> from the server
146     <strong>localhost</strong>, the URL to delete would be
147     <strong>http://localhost:80/?</strong>.</p>
148
149 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
150 <div class="section">
151 <h2><a name="exit" id="exit">Exit Status</a></h2>
152     <p><code>htcacheclean</code> returns a zero status ("true") if all
153     operations were successful, <code>1</code> otherwise. If an URL is
154     specified, and the URL was cached and successfully removed,
155     <code>0</code> is returned, <code>2</code> otherwise. If an error
156     occurred during URL removal, <code>1</code> is returned.</p>
157 </div></div>
158 <div class="bottomlang">
159 <p><span>Available Languages: </span><a href="../en/programs/htcacheclean.html" title="English">&nbsp;en&nbsp;</a> |
160 <a href="../ko/programs/htcacheclean.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
161 <a href="../tr/programs/htcacheclean.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
162 </div><div id="footer">
163 <p class="apache">Copyright 2010 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>
164 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
165 </body></html>