Apache CacheMaxExpire directive ignored

Solution Verified - Updated -


  • Currently setting up mod_cache together with mod_cache_disk to cache content from reverse proxy. CacheDefaultExpire seems to be ignored when configured with the Location directive.
    However when we setup CacheDefaultExpire in the Location section instead of CacheMaxExpire it starts expiring as required, but this should be done by CacheMaxExpire.
  • The CacheMaxExpire setting from the http config is ignored when you use the cache module. The age in the response header exceeds the setting we specified with the CacheMaxExpire directive. Only when the Expires header time is reached doesthe content expires
#Configure module via 

CacheRoot /xxx
CacheDirLevels 2
CacheDirLength 5
CacheMaxFileSize 1000000
CacheMinFileSize 1
CacheIgnoreCacheControl on
CacheIgnoreNoLastMod On
CacheIgnoreQueryString off
CacheIgnoreHeaders None
CacheMaxExpire 86400
CacheQuickHandler off
CacheDefaultExpire 60

#Setup cached reverse proxy via
<Location /test >
        Require all granted
        CacheEnable disk
        CacheMaxExpire 20
        ProxyPass balancer://xxx
        ProxyPassReverse balancer://xxxx


JBoss Core Service(JBCS) httpd 2.4.23

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In