mod_cache Cache files are not deleted after cache content expired
Issue
- Cache files are not deleted after cache content expired. The utility
htcacheclean
results in the following output.
jbcs-httpd-2.4/httpd/sbin/htcacheclean -v -p /X/X/x/cache -l100M
Cleaned /X/X/x/cache cache. Statistics:
size limit 100.0M
inodes limit 0
total size was 593.6K, total size now 593.6K
total inodes was 1452, total inodes now 1452
total entries was 363, total entries now 363
0 entries deleted (0 from future, 0 expired, 0 fresh
- The size listed by
htcacheclean
does not appear to represent the same size output bydu
. If I test on a cache with 2 items, 16k in total as given by du, a limit -l10k
on thehtcacheclean
has no effect, as the cleaner reports a cache size of 2.7k.
[root@cs conf]# du -sk /opt/rh/jbcs-httpd24/root/var/cache/httpd/local
16 /opt/rh/jbcs-httpd24/root/var/cache/httpd/local
[root@cs conf]# /opt/rh/jbcs-httpd24/root/sbin/htcacheclean -v -p/opt/rh/jbcs-httpd24/root/var/cache/httpd/local -l10k
Cleaned /opt/rh/jbcs-httpd24/root/var/cache/httpd/local. Statistics:
size limit 10.0K
inodes limit 0
total size was 2.7K, total size now 2.7K
total inodes was 14, total inodes now 14
total entries was 2, total entries now 2
0 entries deleted (0 from future, 0 expired, 0 fresh)
- If I subsequently lower the cleaner limit to
-l1k
, the cache is indeed cleaned. See output below.
[root@cs conf]# /opt/rh/jbcs-httpd24/root/sbin/htcacheclean -v -p/opt/rh/jbcs-httpd24/root/var/cache/httpd/local -l1k
Cleaned /opt/rh/jbcs-httpd24/root/var/cache/httpd/local. Statistics:
size limit 1.0K
[root@cs conf]# /opt/rh/jbcs-httpd24/root/sbin/htcacheclean -v -p/opt/rh/jbcs-httpd24/root/var/cache/httpd/local -l1k
Cleaned /opt/rh/jbcs-httpd24/root/var/cache/httpd/local. Statistics:
size limit 1.0K
inodes limit 0
total size was 2.7K, total size now 0.0K
total inodes was 14, total inodes now 10
total entries was 2, total entries now 0
2 entries deleted (0 from future, 0 expired, 2 fresh)
Environment
- Red Hat JBoss Core Service
- Apache httpd 2.4.23
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.