https://issues.apache.org/bugzilla/show_bug.cgi?id=21260

--- Comment #10 from Edward Lu <[email protected]> ---
Created attachment 31447
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31447&action=edit
Change CacheMaxExpire/CacheMinExpire doc to be more accurate

This behavior is still around today, in trunk. To summarize the discussion:

CacheMaxExpire/CacheMinExpire only take effect if no valid expiry date is
specified and a valid last modified date is specified. Additionally, they are
unconditionally overriden by Cache-Control header directives. One can see this
behavior by following the code paths in mod_cache.c (cache_save_filter(), do a
search on "maxex") and cache_util.c (cache_check_freshness(), called from
cache_select() in cache_storage.c).

The documentation, on the other hand, says that CacheMaxExpire overrides the
expiry date supplied, and says pretty much nothing as to whether it affects the
Cache-Control directives or not. CacheMinExpire says "This is only used if no
valid expire time was supplied with the document", which is actually true, but
ignores the fact that a valid Last-Modified value must be supplied as well.

There's also this confusing case in cache_save_filter(): if there's a max-age
and a last-modified date but no valid expiry date,
CacheMaxExpire/CacheMinExpire try to do something by setting the expiry date
field (what would normally get set by the Expires header). However, that field
just gets overriden by max-age anyway in cache_check_freshness(), so nothing is
accomplished.

This behavior's apparently been around for more than ten years, so I've taken a
shot at changing the documentation only. However, I do also feel that these
directives are not very useful as they are currently implemented.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to