httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Montague <>
Subject [RFC] enhancement: mod_cache bypass
Date Sat, 23 Aug 2014 02:50:30 GMT
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:

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

# Do not serve cached pages to our testing network:
<Location /some/path>
         CacheEnable disk "expr=! ( %{REMOTE_ADDR} -ipmatch )"

Is there interest in such an enhancement?  If so, I'll make any 
requested changes to the implementation, port the patch forward to 
trunk, put in real APLOGNOs, make sure it passes the test suite, create 
a documentation patch, and create a bugzilla for all this.

   Mark Montague

View raw message