[users@httpd] mod_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a better list to use for questions about core modules?



I'm using mod_cache on Apache 2.0.55 (Debian Sid) with the following
config:


    ProxyVia            On
    CacheRoot           /var/cache/apache2/proxy
    CacheSize           1000
    CacheMaxExpire      300
    CacheIgnoreHeaders  Set-Cookie
    ProxyReceiveBufferSize 16384

    CacheEnable disk /
    <proxy *>
        allow from all
    </proxy>

And I'm using a reverse proxy to connect to the back end machine.
The back end machine provides Last-Modified, Expires, and
Cache-Control headers.


When I first start up Apache files are cached.  But, once they expire
then they are no longer cached and *always* fetch from the back end
server.  It's as if the front end mod_cache server is not updating
it's Expires date.

Maybe I don't understand CacheMaxExpire setting??


For example here's two requests that were handled by the cache (note
the "Age:" header.  The back end server was not accessed for these
requests.


    moseley@bumby:~/WS2$ HEAD  http://bumby:82/css/style.css
    200 OK
    Cache-Control: max-age=300
    Connection: close
    Date: Fri, 19 May 2006 20:35:57 GMT
    Via: 1.1 localhost:82
    Age: 223
    Server: Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8a
    Content-Length: 2264
    Content-Type: text/css
    Expires: Fri, 19 May 2006 20:37:14 GMT
    Last-Modified: Sun, 29 Jan 2006 14:59:44 GMT
    Client-Date: Fri, 19 May 2006 20:35:57 GMT
    Client-Peer: 192.168.1.2:82
    Client-Response-Num: 1

    moseley@bumby:~/WS2$ date -u
    Fri May 19 20:36:19 UTC 2006

    moseley@bumby:~/WS2$ HEAD  http://bumby:82/css/style.css
    200 OK
    Cache-Control: max-age=300
    Connection: close
    Date: Fri, 19 May 2006 20:36:21 GMT
    Via: 1.1 localhost:82
    Age: 247
    Server: Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8a
    Content-Length: 2264
    Content-Type: text/css
    Expires: Fri, 19 May 2006 20:37:14 GMT
    Last-Modified: Sun, 29 Jan 2006 14:59:44 GMT
    Client-Date: Fri, 19 May 2006 20:36:21 GMT
    Client-Peer: 192.168.1.2:82
    Client-Response-Num: 1

Now, once it got to 300 seconds the front-end server (running
mod_cache) *always* fetches the document from the back-end server:

    moseley@bumby:~/WS2$ HEAD  http://bumby:82/css/style.css
    200 OK
    Cache-Control: max-age=300
    Connection: close
    Date: Fri, 19 May 2006 20:37:41 GMT
    Via: 1.1 localhost:82
    Server: Apache/2.0.55 (Debian) mod_perl/2.0.2 Perl/v5.8.8
    Content-Length: 2264
    Content-Type: text/css
    Expires: Fri, 19 May 2006 20:42:41 GMT
    Last-Modified: Sun, 29 Jan 2006 14:59:44 GMT
    Client-Date: Fri, 19 May 2006 20:37:42 GMT
    Client-Peer: 192.168.1.2:82
    Client-Response-Num: 1

    moseley@bumby:~/WS2$ HEAD  http://bumby:82/css/style.css
    200 OK
    Cache-Control: max-age=300
    Connection: close
    Date: Fri, 19 May 2006 20:37:47 GMT
    Via: 1.1 localhost:82
    Server: Apache/2.0.55 (Debian) mod_perl/2.0.2 Perl/v5.8.8
    Content-Length: 2264
    Content-Type: text/css
    Expires: Fri, 19 May 2006 20:42:47 GMT
    Last-Modified: Sun, 29 Jan 2006 14:59:44 GMT
    Client-Date: Fri, 19 May 2006 20:37:47 GMT
    Client-Peer: 192.168.1.2:82
    Client-Response-Num: 1


Note that the back-end server returns both Cache-Control and Expires
headers without regard to http/1.0 vs http/1.1.  Not sure if that
might be a problem or not.






-- 
Bill Moseley
moseley@xxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux