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 or M for MBytes.
87
88       -Llimit
89              Specify limit as the total disk cache inode limit.
90
91       -i     Be intelligent and run only when there was a modification of the
92              disk  cache.  This  option is only possible together with the -d
93              option.
94
95       -a     List the URLs currently stored in the  cache.  Variants  of  the
96              same URL will be listed once for each variant.
97
98       -A     List  the  URLs  currently stored in the cache, along with their
99              attributes in the following order: url, header size, body  size,
100              status,  entity  version,  date,  expiry, request time, response
101              time, body present, head request.
102
103

DELETING A SPECIFIC URL

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

LISTING URLS IN THE CACHE

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

EXIT STATUS

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