You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/05/15 18:25:43 UTC

DO NOT REPLY [Bug 42425] New: - Additional freshness checks in mod_cache.c cause must-revalidate or max-age=0 content to not get stored.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42425>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42425

           Summary: Additional freshness checks in mod_cache.c cause must-
                    revalidate or max-age=0 content to not get stored.
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: basam@stream.aol.net


Here is the relevant output from diff of the 2.2.3 from the 2.2.4 version of
mod_cache.c

diff httpd-2.2.3/modules/cache/mod_cache.c httpd-2.2.4/modules/cache/mod_cache.c

428a431,435
>     else if (exp != APR_DATE_BAD && exp < r->request_time)
>     {
>         /* if a Expires header is in the past, don't cache it */
>         reason = "Expires header already expired, not cacheable";
>     }

The above check is comparing the the expires time from the server (in second
granularity) to the request_time from the client ( upto micro second
granularity). Even though we have all of our hosts running NTP, it is possible
to get a very small skew which is enough to cause this check to pass and the
object ends up not getting put into local cache.

We have a workaround by commenting out the above code, but i don't believe this
check is needed when you have an explicit expires or Cache-Control header from
the server.

regards,
         Sridhar

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

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


DO NOT REPLY [Bug 42425] - Additional freshness checks in mod_cache.c cause must-revalidate or max-age=0 content to not get stored.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42425>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42425





------- Additional Comments From basam@stream.aol.net  2007-05-15 13:47 -------

Some of the content we server is required to have an expires "now" or max-age=0
or must-revalidate to guarantee freshness.

Without this check, the origin sees IMS requests from the cache a vast majority
of the time so isn't being taxed that much. 

With the additional check, the edge does a lot more unconditional GET requests
to the origin taxing the origin resources a lot more.

regards,
          Sridhar

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

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


DO NOT REPLY [Bug 42425] - Additional freshness checks in mod_cache.c cause must-revalidate or max-age=0 content to not get stored.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42425>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42425


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From rpluem@apache.org  2007-05-15 13:08 -------
I do not get your problem here. Caching is only denied if there is an Expires
header and if the time mentioned in the Expires header is earlier then the
request time. If this comparison becomes true only due to the different
granularity of the times measured (which can happen) this means that the
difference between the time in the Expires header and the request time is less
than a second. So there is a very short period of time (less than a second)
during which this entity (if it is cached) would be regarded as fresh and thus
deliverable to the client from the cache without further revalidation. So what
is the point in having cached objects that are that short lived?

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

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