FAQ
I am using mod_cache with Apache 2.2.20. I am using mod_jk to forward
requests to Tomcat.

mod_cache is not refreshing it's cache, no matter if I am using disk
or memory caching. Here is a snipped of the relevant configuration:

<IfModule mod_cache.c>

CacheDefaultExpire 60
CacheMaxExpire 61
CacheIgnoreNoLastMod On
CacheIgnoreQueryString On
CacheIgnoreHeaders Set-Cookie
CacheIgnoreURLSessionIdentifiers jsessionid

<IfModule mod_disk_cache.c>
CacheRoot "D:/apachecache"
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 2
</IfModule>
<IfModule mod_mem_cache.c>
CacheEnable mem /

#100MB in KB
MCacheSize 102400

#MCacheMinObjectSize 1

#4MB in bytes
MCacheMaxObjectSize 4194304
</IfModule>

</IfModule>

The log files indicate that my requests are being cached and served
from the cache longer than the 61 seconds I have defined in the
CacheMaxExpire directive. When I mean longer, I mean forever unless I
execute a refresh in my browser (Chrome and Firefox). I can see the
"Age" header tick up whenever I access a cached page well past the 61
seconds I have defined. I am not currently adding any additional
headers that should prevent the cache from being refreshed.

Request Headers:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cookie:JSESSIONID=6379D52F51B77AD37A94991CC4C45411
Host:x.y.com:80
Proxy-Connection:keep-alive
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1)
AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1

Response Headers:
Age:266
Content-Language:en-US
Content-Length:6880
Content-Type:text/html;charset=UTF-8
Date:Fri, 16 Sep 2011 15:58:10 GMT
Proxy-Connection:keep-alive
Server:Apache/2.2.20 (Win32) mod_jk/1.2.32

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesapache
postedSep 16, '11 at 4:03p
activeSep 16, '11 at 4:03p
posts1
users1
websitehttpd.apache.org
irc#httpd

1 user in discussion

Brendon Anderson: 1 post

People

Translate

site design / logo © 2022 Grokbase