Reverse proxy doesn't cache

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
Eric Jain [ Di, 03 September 2002 19:34 ] [ ID #12170 ]

Re: Reverse proxy doesn't cache

Eric Jain wrote:

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

Your statement in the subject line is perfectly true: the proxy doesn't
cache at all - all caching functionality has been moved into mod_cache,
which is capable of caching any content, not only content from proxy.

If you post this question to the main dev list, someone there will be
able to help you.

Regards,
Graham
--
-----------------------------------------
minfrin [at] sharp.fm
"There's a moon
over Bourbon Street
tonight..."
Graham Leggett [ Mi, 04 September 2002 08:35 ] [ ID #12171 ]
Webserver » gmane.comp.apache.mod-proxy » Reverse proxy doesn't cache

Vorheriges Thema: Source of memory leak in mod_proxy?
Nächstes Thema: RE: Siteminder/mod_proxy issues