Hi,
Is it in theory possible to insert a perl output filter between
mod_proxy and mod_cache?
Or at least between mod_proxy and the client?
The problem I'm trying to solve is this:
We have 100+ web servers where apache fronts a separate tomcat server
using mod_proxy.
Sadly, the tomcat dev's forgot to set any caching headers in the HTTP
response (either Expires, Last-Modified or Cache-control) so the sites
are largely uncacheable by browsers and the various tomcats are becoming
overloaded.
1/3 of our sites are typically invariant (the production sites have
stable and unchanging data and most queries are via GET requests).
Therefore, the idea of forcing in some cache control headers en-route
and also enabling some apache caching has a good chance of working well
without affecting anything.
mod_headers and mod_proxy don't seem to play well together and mod-cache
doesn't either (probably due to lack of cache control headers in the
tomcat response, though I haven't proved this is actually the case).
So the thought of doing a perl based filter to insert cache-control
headers occurred.
It is likely I can insert such a filter on Apache 2.2 *between*
mod_proxy and mod_cache?
Or am I going to have to implement a filter that includes proxying
and/or caching?
Many thanks for any advice,
Cheers,
Tim
--
Tim Watts
Personal Blog: http://www.dionic.net/tim/