]> granicus.if.org Git - apache/blob - docs/man/htcacheclean.8
66b237b0bf1aabda4dfd995ce3b8666592c4ad31
[apache] / docs / man / htcacheclean.8
1 .\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2 .\" DO NOT EDIT! Generated from XML source.
3 .\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4 .de Sh \" Subsection
5 .br
6 .if t .Sp
7 .ne 5
8 .PP
9 \fB\\$1\fR
10 .PP
11 ..
12 .de Sp \" Vertical space (when we can't use .PP)
13 .if t .sp .5v
14 .if n .sp
15 ..
16 .de Ip \" List item
17 .br
18 .ie \\n(.$>=3 .ne \\$3
19 .el .ne 3
20 .IP "\\$1" \\$2
21 ..
22 .TH "HTCACHECLEAN" 8 "2010-03-29" "Apache HTTP Server" "htcacheclean"
23
24 .SH NAME
25 htcacheclean \- Clean up the disk cache
26
27 .SH "SYNOPSIS"
28  
29 .PP
30 \fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBr\fR ] [ -\fBn\fR ] -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR
31  
32 .PP
33 \fBhtcacheclean\fR [ -\fBn\fR ] [ -\fBt\fR ] [ -\fBi\fR ] [ -\fBP\fR\fIpidfile\fR ] -\fBd\fR\fIinterval\fR -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR
34  
35 .PP
36 \fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] -\fBp\fR\fIpath\fR \fIurl\fR
37  
38
39 .SH "SUMMARY"
40  
41 .PP
42 htcacheclean is used to keep the size of mod_disk_cache's storage within a certain limit\&. This tool can run either manually or in daemon mode\&. When running in daemon mode, it sleeps in the background and checks the cache directory at regular intervals for cached content to be removed\&. You can stop the daemon cleanly by sending it a TERM or INT signal\&. When run manually, a once off check of the cache directory is made for cached content to be removed\&. If one or more URLs are specified, each URL will be deleted from the cache, if present\&.
43  
44
45 .SH "OPTIONS"
46  
47  
48 .TP
49 -d\fIinterval\fR
50 Daemonize and repeat cache cleaning every \fIinterval\fR minutes\&. This option is mutually exclusive with the -D, -v and -r options\&. To shutdown the daemon cleanly, just send it a SIGTERM or SIGINT\&.  
51 .TP
52 -D
53 Do a dry run and don't delete anything\&. This option is mutually exclusive with the -d option\&.  
54 .TP
55 -v
56 Be verbose and print statistics\&. This option is mutually exclusive with the -d option\&.  
57 .TP
58 -r
59 Clean thoroughly\&. This assumes that the Apache web server is not running (otherwise you may get garbage in the cache)\&. This option is mutually exclusive with the -d option and implies the -t option\&.  
60 .TP
61 -n
62 Be nice\&. This causes slower processing in favour of other processes\&. htcacheclean will sleep from time to time so that (a) the disk IO will be delayed and (b) the kernel can schedule other processes in the meantime\&.  
63 .TP
64 -t
65 Delete all empty directories\&. By default only cache files are removed, however with some configurations the large number of directories created may require attention\&. If your configuration requires a very large number of directories, to the point that inode or file allocation table exhaustion may become an issue, use of this option is advised\&.  
66 .TP
67 -p\fIpath\fR
68 Specify \fIpath\fR as the root directory of the disk cache\&. This should be the same value as specified with the CacheRoot directive\&.  
69 .TP
70 -P\fIpidfile\fR
71 Specify \fIpidfile\fR as the name of the file to write the process ID to when daemonized\&.  
72 .TP
73 -l\fIlimit\fR
74 Specify \fIlimit\fR as the total disk cache size limit\&. The value is expressed in bytes by default (or attaching B to the number)\&. Attach K for Kbytes or M for MBytes\&.  
75 .TP
76 -i
77 Be intelligent and run only when there was a modification of the disk cache\&. This option is only possible together with the -d option\&.  
78  
79 .SH "DELETING A SPECIFIC URL"
80  
81 .PP
82 If htcacheclean is passed one or more URLs, each URL will be deleted from the cache\&. If multiple variants of an URL exists, all variants would be deleted\&.
83  
84 .PP
85 When a reverse proxied URL is to be deleted, the effective URL is constructed from the \fBHost\fR header, the \fBport\fR, the \fBpath\fR and the \fBquery\fR\&. Note the '?' in the URL must always be specified explicitly, whether a query string is present or not\&. For example, an attempt to delete the path \fB/\fR from the server \fBlocalhost\fR, the URL to delete would be \fBhttp://localhost:80/?\fR\&.
86  
87 .SH "EXIT STATUS"
88  
89 .PP
90 htcacheclean returns a zero status ("true") if all operations were successful, 1 otherwise\&. If an URL is specified, and the URL was cached and successfully removed, 0 is returned, 2 otherwise\&. If an error occurred during URL removal, 1 is returned\&.
91