perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Moseley <>
Subject mod_cache in front mod_perl
Date Thu, 18 May 2006 23:18:28 GMT
Anyone using mod_cache in Apache 2?

I'd like give it a whirl, but I can't seem to get it to cache.
I'm wondering what config I have wrong.

The mod_perl applicaiton generates some cache-able content.

I'm using Debian's apache2 setup, mostly, which looks like:

    LoadModule cache_module      /usr/lib/apache2/modules/
    LoadModule disk_cache_module /usr/lib/apache2/modules/
    LoadModule proxy_module      /usr/lib/apache2/modules/
    LoadModule proxy_http_module /usr/lib/apache2/modules/

    ProxyVia On
    CacheRoot /var/cache/apache2/proxy

    # what if want to always us Expires?
    CacheMaxExpire 300

    <VirtualHost *:3003>
        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined

        CacheEnable disk /
        CacheIgnoreHeaders Set-Cookie
        ProxyReceiveBufferSize 16384
        <proxy *>
            allow from all

        <Location />
            Allow from all

        # back to the app server
        ProxyPass           /
        ProxyPassReverse    /


So if I do a request:

$ lwp-request -ed http://bumby:3003/css/style.css
Cache-Control: max-age=300
Connection: close
Date: Thu, 18 May 2006 23:00:35 GMT
Via: 1.1 bumby:3003
Server: Apache/2.0.55 (Debian) mod_perl/2.0.2 Perl/v5.8.8
Content-Length: 2264
Content-Type: text/css
Expires: Thu, 18 May 2006 23:05:35 GMT
Last-Modified: Sun, 29 Jan 2006 14:59:44 GMT
Client-Date: Thu, 18 May 2006 23:00:35 GMT
Client-Response-Num: 1

And making that same request again hits the back-end server again.
And nothing is stored in /var/cache/apache2/proxy

Also, I know about mod_deflate, but I'm wondering how mod_cache deals
with deflated content.  The mod_perl server can deflate/gzip the
content, so would mod_cache store include compressed and non
compressed versions?

Bill Moseley

View raw message