1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.\" DO NOT EDIT! Generated from XML source.
.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "HTCACHECLEAN" 8 "2010-09-29" "Apache HTTP Server" "htcacheclean"
.SH NAME
htcacheclean \- Clean up the disk cache
.SH "SYNOPSIS"
.PP
\fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBr\fR ] [ -\fBn\fR ] [ -\fBR\fR\fIround\fR ] -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR
.PP
\fBhtcacheclean\fR [ -\fBn\fR ] [ -\fBt\fR ] [ -\fBi\fR ] [ -\fBP\fR\fIpidfile\fR ] [ -\fBR\fR\fIround\fR ] -\fBd\fR\fIinterval\fR -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR
.PP
\fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBR\fR\fIround\fR ] -\fBp\fR\fIpath\fR \fIurl\fR
.SH "SUMMARY"
.PP
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\&.
.SH "OPTIONS"
.TP
-d\fIinterval\fR
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\&.
.TP
-D
Do a dry run and don't delete anything\&. This option is mutually exclusive with the -d option\&.
.TP
-v
Be verbose and print statistics\&. This option is mutually exclusive with the -d option\&.
.TP
-r
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\&.
.TP
-n
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\&.
.TP
-t
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\&.
.TP
-p\fIpath\fR
Specify \fIpath\fR as the root directory of the disk cache\&. This should be the same value as specified with the CacheRoot directive\&.
.TP
-P\fIpidfile\fR
Specify \fIpidfile\fR as the name of the file to write the process ID to when daemonized\&.
.TP
-R\fIround\fR
Specify \fIround\fR as the amount to round sizes up to, to compensate for disk block sizes\&. Set to the block size of the cache partition\&.
.TP
-l\fIlimit\fR
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\&.
.TP
-i
Be intelligent and run only when there was a modification of the disk cache\&. This option is only possible together with the -d option\&.
.SH "DELETING A SPECIFIC URL"
.PP
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\&.
.PP
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\&.
.SH "EXIT STATUS"
.PP
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\&.
|