httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: [RFC] enhancement: mod_cache bypass
Date Sat, 23 Aug 2014 09:19:40 GMT
On 23 Aug 2014, at 03:50, Mark Montague <mark@catseye.org> wrote:

> I've attached a proof-of-concept patch against httpd 2.4.10 that allows mod_cache to
be bypassed under conditions specified in the conf files.  It adds an optional fourth argument
to the CacheEnable directive:
> 
> CacheEnable cache_type [url-string] [expr=expression]
> 
> If the expression is present, data will only be served from the cache for requests for
which the expression evaluates to true.  This permits things such as:

Does this not duplicate the functionality of the If directives?

http://httpd.apache.org/docs/current/mod/core.html#if

> # Only serve cached data if no (login or other) cookies are present in the request:
> CacheEnable disk / "expr=-z %{req:Cookie}"

As an aside, trying to single out and control just one cache using directives like this is
ineffective, as other caches like ISP caches and browser caches will not be included in the
configuration.

Rather control the cache using the Cache-Control headers in the formal HTTP specs.

Regards,
Graham
--


Mime
View raw message