Sample Header Ad - 728x90

htcacheclean with "-A" flag only lists 64 cache entries, where are the rest?

0 votes
1 answer
2180 views
I have a webserver running Apache. It has caching enabled via
. CacheRoot "/var/cache/httpd/mod_cache" CacheDirLevels 1 CacheDirLength 1 I would like to list the URLs of the objects in the cache. If I use the bundled
command with the
-A
flag to query the cache, it only returns 64 objects: htcacheclean -A -p/var/cache/httpd/mod_cache Output : 64 lines, each looking like this example: http:// 823 102014 200 0 1603846099818215 1603849699818215 1603846099807137 1603846099818215 1 0 The entries which **do** get output, look correct, and contain the expected URLs. However, if I run a "find" command to count up the number of
.header
files, I get far more than 64: # find /var/cache/httpd/mod_cache -name '*.header' | wc -l 30440 # Apache version is the one currently provided with the CentOS 7.8 distro: version 2.4.6 with various patches backported. From the man page: -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. ... 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: ... Can anyone provide clues as to what is happening? How can I dump the full list of cached object URLs using
?
Asked by Ralph Wahrlich (146 rep)
Oct 28, 2020, 01:51 AM
Last activity: May 13, 2025, 11:07 AM