This may be an issue with mod_cache rather than mod_proxy. but then they
don't have a mailing list to bother...

Anyways, I am using Apache (2.0.40) on Windows as a simple reverse proxy for
an application server. Works well, only caching doesn't work.

Request:
GET /test/ HTTP/1.1
Connection: Keep-Alive
...

Response:
HTTP/1.1 200 OK
Date: Tue, 03 Sep 2002 16:49:51 GMT
Server: Jetty (Windows XP 5.1 x86)
Cache-Control: public
Expires: Tue, 03 Sep 2002 22:49:51 GMT
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 6528
...

Static files additionally have "Last-Modified: Tue, 03 Sep 2002 16:02:33
GMT". This causes typical browsers to add "If-Modified-Since: Tue, 03 Sep
2002 16:02:33 GMT" to their next request. But these files are not loaded
from cache either.

Configuration:

<IfModule mod_proxy.c>
    ProxyPass /test/ http://xyz:8080/test/
    ProxyPassReverse /test/ http://xyz:8080/test/
    CacheEnable mem /expasy
    MCacheMaxObjectCount 10000
    MCacheMinObjectSize 1
    MCacheMaxObjectSize 10000
    MCacheSize 100000
</IfModule>

If I use mod_disk_cache instead of mod_mem_cache, I get a few log entries.
It seems that no attempt is made to cache any text/html pages, and all other
files are reloaded from the application server, even though they seem to
have been cached previously.

[info] disk_cache: Serving Cached URL /expasy/css/tigris.css
[info] disk_cache: Served headers for URL /expasy/css/tigris.css
[info] disk_cache: Caching URL /expasy/css/tigris.css
[info] disk_cache: Caching headers for URL /expasy/css/tigris.css
[info] disk_cache: Cached body for URL /expasy/css/tigris.css

Any ideas what I am doing wrong?


--
Eric Jain


Reply via email to