1HTCACHECLEAN(8)                  htcacheclean                  HTCACHECLEAN(8)
2
3
4

NAME

6       htcacheclean - Clean up the disk cache
7
8

SYNOPSIS

10       htcacheclean  [  -D  ] [ -v ] [ -t ] [ -r ] [ -n ] [ -Rround ] -ppath [
11       -llimit ] [ -Llimit ]
12
13
14       htcacheclean [ -n ] [ -t ] [ -i ] [ -Ppidfile ] [ -Rround ]  -dinterval
15       -ppath [ -llimit ] [ -Llimit ]
16
17
18       htcacheclean [ -v ] [ -Rround ] -ppath [ -a ] [ -A ]
19
20
21       htcacheclean [ -D ] [ -v ] [ -t ] [ -Rround ] -ppath url
22
23
24

SUMMARY

26       htcacheclean  is  used  to  keep  the  size of mod_cache_disk's storage
27       within a given size limit, or limit on inodes in use. This tool can run
28       either  manually  or  in  daemon  mode. When running in daemon mode, it
29       sleeps in the background and checks  the  cache  directory  at  regular
30       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
32       off  check  of  the  cache  directory  is made for cached content to be
33       removed. If one or more URLs are specified, each URL  will  be  deleted
34       from the cache, if present.
35
36
37

OPTIONS

39       -dinterval
40              Daemonize and repeat cache cleaning every interval minutes. This
41              option is mutually exclusive with the -D, -v and -r options.  To
42              shutdown the daemon cleanly, just send it a SIGTERM or SIGINT.
43
44       -D     Do  a dry run and don't delete anything. This option is mutually
45              exclusive with the -d option. When doing a dry run and  deleting
46              directories  with  -t,  the inodes reported deleted in the stats
47              cannot take into account the directories deleted,  and  will  be
48              marked as an estimate.
49
50       -v     Be  verbose and print statistics. This option is mutually exclu‐
51              sive with the -d option.
52
53       -r     Clean thoroughly. This assumes that the Apache web server is not
54              running  (otherwise  you  may  get  garbage  in the cache). This
55              option is mutually exclusive with the -d option and implies  the
56              -t option.
57
58       -n     Be  nice.  This causes slower processing in favour of other pro‐
59              cesses. htcacheclean will sleep from time to time  so  that  (a)
60              the  disk  IO  will  be  delayed and (b) the kernel can schedule
61              other processes in the meantime.
62
63       -t     Delete all empty directories. By default only  cache  files  are
64              removed,  however  with  some configurations the large number of
65              directories created may require attention. If your configuration
66              requires  a  very large number of directories, to the point that
67              inode or file allocation table exhaustion may become  an  issue,
68              use of this option is advised.
69
70       -ppath Specify  path  as  the  root  directory  of the disk cache. This
71              should be the same value as specified with the CacheRoot  direc‐
72              tive.
73
74       -Ppidfile
75              Specify  pidfile as the name of the file to write the process ID
76              to when daemonized.
77
78       -Rround
79              Specify round as the amount to round sizes up to, to  compensate
80              for  disk block sizes. Set to the block size of the cache parti‐
81              tion.
82
83       -llimit
84              Specify limit as the total disk cache size limit. The  value  is
85              expressed  in  bytes  by default (or attaching B to the number).
86              Attach K for Kbytes, M for MBytes or G for Gbytes.
87
88       -Llimit
89              Specify limit as the total disk cache inode limit.  K,  M  or  G
90              suffix can also be used.
91
92       -i     Be intelligent and run only when there was a modification of the
93              disk cache. This option is only possible together  with  the  -d
94              option.
95
96       -a     List  the  URLs  currently  stored in the cache. Variants of the
97              same URL will be listed once for each variant.
98
99       -A     List the URLs currently stored in the cache,  along  with  their
100              attributes  in the following order: url, header size, body size,
101              status, entity version, date,  expiry,  request  time,  response
102              time, body present, head request.
103
104

DELETING A SPECIFIC URL

106       If  htcacheclean  is  passed one or more URLs, each URL will be deleted
107       from the cache. If multiple variants of an  URL  exists,  all  variants
108       would be deleted.
109
110
111       When  a reverse proxied URL is to be deleted, the effective URL is con‐
112       structed from the Host header, the port, the path and the  query.  Note
113       the '?' in the URL must always be specified explicitly, whether a query
114       string is present or not. For example, an attempt to delete the path  /
115       from  the  server  localhost,  the URL to delete would be http://local
116       host:80/?.
117
118

LISTING URLS IN THE CACHE

120       By passing the -a or -A options to htcacheclean, the  URLs  within  the
121       cache will be listed as they are found, one URL per line. The -A option
122       dumps the full cache entry after the URL, with fields in the  following
123       order:
124
125
126
127       url    The URL of the entry.
128
129       header size
130              The size of the header in bytes.
131
132       body size
133              The size of the body in bytes.
134
135       status Status of the cached response.
136
137       entity version
138              The  number  of  times  this  entry has been revalidated without
139              being deleted.
140
141       date   Date of the response.
142
143       expiry Expiry date of the response.
144
145       request time
146              Time of the start of the request.
147
148       response time
149              Time of the end of the request.
150
151       body present
152              If 0, no body is stored with this request, 1 otherwise.
153
154       head request
155              If 1, the entry contains a cached HEAD request with no  body,  0
156              otherwise.
157
158

EXIT STATUS

160       htcacheclean returns a zero status ("true") if all operations were suc‐
161       cessful, 1 otherwise. If an URL is specified, and the  URL  was  cached
162       and  successfully  removed,  0  is  returned,  2 otherwise. If an error
163       occurred during URL removal, 1 is returned.
164
165
166
167
168Apache HTTP Server                2019-08-09                   HTCACHECLEAN(8)
Impressum