Apache CacheMaxExpire directive ignored
Issue
- Currently setting up mod_cache together with mod_cache_disk to cache content from reverse proxy.
CacheDefaultExpireseems to be ignored when configured with theLocationdirective.
However when we setupCacheDefaultExpirein the Location section instead ofCacheMaxExpireit starts expiring as required, but this should be done byCacheMaxExpire. - The
CacheMaxExpiresetting from the http config is ignored when you use the cache module. The age in the response header exceeds the setting we specified with theCacheMaxExpiredirective. 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
</Location>
Environment
JBoss Core Service(JBCS) httpd 2.4.23
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
