HTCACHECLEAN
NAMESYNOPSIS
SUMMARY
OPTIONS
DELETING A SPECIFIC URL
LISTING URLS IN THE CACHE
EXIT STATUS
NAME
htcacheclean − Clean up the disk cache
SYNOPSIS
htcacheclean [ -D ] [ -v ] [ -t ] [ -r ] [ -n ] [ -Rround ] -ppath [-llimit| -Llimit]
htcacheclean [ -n ] [ -t ] [ -i ] [ -Ppidfile ] [ -Rround ] -dinterval -ppath [-llimit| -Llimit]
htcacheclean [ -v ] [ -Rround ] -ppath [ -a ] [ -A ]
htcacheclean [ -D ] [ -v ] [ -t ] [ -Rround ] -ppath url
SUMMARY
htcacheclean is used to keep the size of mod_cache_disk’s storage within a given size limit, or limit on inodes in use. 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.
OPTIONS
-dinterval
Daemonize and repeat cache cleaning every interval 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.
-D |
Do a dry run and don’t delete anything. This option is mutually exclusive with the -d option. When doing a dry run and deleting directories with -t, the inodes reported deleted in the stats cannot take into account the directories deleted, and will be marked as an estimate. | ||
-v |
Be verbose and print statistics. This option is mutually exclusive with the -d option. | ||
-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. | ||
-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. | ||
-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. | ||
-ppath |
Specify path as the root directory of the disk cache. This should be the same value as specified with the CacheRoot directive. |
-Ppidfile
Specify pidfile as the name of the file to write the process ID to when daemonized.
-Rround
Specify round as the amount to round sizes up to, to compensate for disk block sizes. Set to the block size of the cache partition.
-llimit
Specify limit 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.
-Llimit
Specify limit as the total disk cache inode limit.
-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. | ||
-a |
List the URLs currently stored in the cache. Variants of the same URL will be listed once for each variant. | ||
-A |
List the URLs currently stored in the cache, along with their attributes in the following order: url, header size, body size, status, entity version, date, expiry, request time, response time, body present, head request. |
DELETING A SPECIFIC URL
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.
When a reverse proxied URL is to be deleted, the effective URL is constructed from the Host header, the port, the path and the query. 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 / from the server localhost, the URL to delete would be http://localhost:80/?.
LISTING URLS IN THE CACHE
By passing the -a or -A options to htcacheclean, the URLs within the cache will be listed as they are found, one URL per line. The -A option dumps the full cache entry after the URL, with fields in the following order:
url |
The URL of the entry. |
header size
The size of the header in bytes.
body size
The size of the body in bytes.
status |
Status of the cached response. |
entity version
The number of times this entry has been revalidated without being deleted.
date |
Date of the response. |
|||
expiry |
Expiry date of the response. |
request time
Time of the start of the request.
response time
Time of the end of the request.
body present
If 0, no body is stored with this request, 1 otherwise.
head request
If 1, the entry contains a cached HEAD request with no body, 0 otherwise.
EXIT STATUS
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.
More Linux Commands
manpages/snmpnetstat.1.html
snmpnetstat(1) - display networking status and configuration
The snmpnetstat command symbolically displays the values of various network-related information retrieved from a remote system using the SNMP protocol. There ar
manpages/pwd.1.html
pwd(1) - print name of current/working directory (Man Page)
Print the full filename of the current working directory. -L, --logical use PWD from environment, even if it contains symlinks -P, --physical avoid all symlinks
manpages/procfs.5.html
procfs(5) process information pseudo-filesystem (Man Page)
The proc filesystem is a pseudo-filesystem which provides an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but
manpages/avahi-dnsconfd.8.html
avahi-dnsconfd(8) - Unicast DNS server from mDNS/DNS-SD conf
avahi-dnsconfd connects to a running avahi-daemon and runs the script /etc/avahi/dnsconfd.action for each unicast DNS server that is announced on the local LAN.
manpages/LINES.3ncurses.html
LINES(3ncurses) - curses global variables - Linux man page
This page summarizes variables provided by the curses library. A more complete description is given in the curses(3X) manual page. Depending on the configuratio
manpages/pgmoil.1.html
pgmoil(1) - replaced by pamoil (Commands - Linux man page)
This program is part of Netpbm(1) pgmoil was replaced in Netpbm 9.16 (July 2001) by pamoil(1) pamoil is backward compatible with pgmoil, but works on color imag
manpages/XML::PatAct::ActionTempl.3pm.html
XML::PatAct::ActionTempl(3pm) - An action module for........
XML::PatAct::ACTION is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ACTION ... New XML::PatAct::ACTION instances are
manpages/XSetIconName.3.html
XSetIconName(3) - set or read a window's WM_ICON_NAME proper
The XSetWMIconName convenience function calls XSetTextProperty to set the WM_ICON_NAME property. The XGetWMIconName convenience function calls XGetTextProperty
manpages/Tcl_RegExpRange.3.html
Tcl_RegExpRange(3) - Pattern matching with regular expressio
Tcl_RegExpMatch determines whether its pattern argument matches regexp, where regexp is interpreted as a regular expression using the rules in the re_syntax ref
manpages/Tk_SetWindowBackground.3.html
Tk_SetWindowBackground(3) - change window configuration or a
These procedures are analogous to the X library procedures with similar names, such as XConfigureWindow. Each one of the above procedures calls the correspondin
manpages/Tcl_DeleteHashEntry.3.html
Tcl_DeleteHashEntry(3) - procedures to manage hash tables...
A hash table consists of zero or more entries, each consisting of a key and a value. Given the key for an entry, the hashing routines can very quickly locate th
manpages/nscd.conf.5.html
nscd.conf(5) - name service cache daemon configuration file
The file /etc/nscd.conf is read from nscd(8) at startup. Each line specifies either an attribute and a value, or an attribute, service, and a value. Fields are
