httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47346] New: mod_cache doesn't re-cache expired content when Last-Modified not set
Date Wed, 10 Jun 2009 13:28:27 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47346

           Summary: mod_cache doesn't re-cache expired content when
                    Last-Modified not set
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: fil@taz.de


context: caching reverse proxy with balancer setup (but only one worker yet)

All content delivered from the backend without Last-Modified header is only
cached until the expiry-date is reached once although there is an future
Expires header. No re-caching appears. CacheIgnoreNoLastMod does not affect
this behaviour.

According to the docs (and -as far as I understand- RFC2616) an Expires-Header
alone should be sufficient. Moreover CacheIgnoreNoLastMod should make caching
possible even when Last-Modified header is missing.

Sounds similiar to 27791, but forcing Last-Modified to be set on the backend
makes the Problem disappear.


Headers from backend triggering the problem:
---
  HTTP/1.1 200 OK
  Date: Wed, 10 Jun 2009 12:27:14 GMT
  Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c
  X-Powered-By: PHP/5.2.0-8+etch11
  Cache-Control: max-age=300
  Expires: Wed, 10 Jun 2009 12:32:14 GMT
  Connection: close
  Content-Type: text/html;charset=utf-8
---

after 300sec from the first access the proxy-cache keeps ignoring the cache:
---
  HTTP/1.1 200 OK
  Date: Wed, 10 Jun 2009 12:31:06 GMT
  Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c
  X-Powered-By: PHP/5.2.0-8+etch11
  Cache-Control: max-age=300
  Expires: Wed, 10 Jun 2009 12:36:06 GMT
  Content-Type: text/html;charset=utf-8
  Via: 1.0 www.taz.de
  Connection: close
---

when Last-Modified id forced on backend like:
---
  HTTP/1.1 200 OK
  Date: Wed, 10 Jun 2009 12:34:33 GMT
  Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c
  X-Powered-By: PHP/5.2.0-8+etch11
  Last-Modified: Wed, 10 Jun 2009 12:34:33 GMT
  Expires: Wed, 10 Jun 2009 12:39:33 GMT
  Cache-Control: max-age=300
  Connection: close
  Content-Type: text/html;charset=utf-8

... the proxy-cache behaves:
---
  HTTP/1.1 200 OK
  Date: Wed, 10 Jun 2009 12:36:48 GMT
  Server: Apache/2.2.3 (Debian)
  Last-Modified: Wed, 10 Jun 2009 12:36:34 GMT
  X-Powered-By: PHP/5.2.0-8+etch11
  Cache-Control: max-age=300
  Expires: Wed, 10 Jun 2009 12:41:34 GMT
  Via: 1.1 www.taz.de
  Age: 14
  Content-Length: 89601
  Keep-Alive: timeout=15, max=300
  Connection: Keep-Alive
  Content-Type: text/html;charset=utf-8
---

relevant config

on proxy cache machine:
---
ProxyPreserveHost On
ProxyPass / balancer://webcluster/
<Proxy balancer://webcluster>
  ...
</Proxy>
CacheEnable mem /
---

on backend
---
ExpiresActive On
ExpiresByType text/html "access plus 5 minutes"
---

The following line in my PHP app cures the desease:
---
header( "Last-Modified: ". gmdate( "D, d M Y H:i:s", time() ) ." GMT");
---

regards, Filip Moritz

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message