]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r729316, r729317 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 12 Jan 2009 14:07:10 +0000 (14:07 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 12 Jan 2009 14:07:10 +0000 (14:07 +0000)
look for 'no-cache' in subprocess_env to prevent the saving
of an otherwise cacheable response.

document no-cache envvar

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733762 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
docs/manual/env.html.en
docs/manual/env.xml
docs/manual/mod/mod_cache.html.en
docs/manual/mod/mod_cache.xml
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index 6db07524572dd6122ca994fb4751284a5b81d7ce..504f92541172d59ac64a60da42805e1965be07e3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.12
 
+  *) mod_cache: Introduce 'no-cache' per-request environment variable
+     to prevent the saving of an otherwise cacheable response.
+     [Eric Covener]
+
   *) core: Translate the the status line to ASCII on EBCDIC platforms in
      ap_send_interim_response() and for locally generated "100 Continue"
      responses.  [Eric Covener]
diff --git a/STATUS b/STATUS
index 9c0eee855c39bcfb6a6d683688adf602ed510114..db70741384acc3a89ffb05b77c2a7d5214adf56b 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -94,15 +94,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
       http://people.apache.org/~rederpj/backport_PR46342_simpleLDAPinit.diff
     +1: rederpj, niq, covener
 
-  * mod_cache: Introduce 'no-cache' per-request environment variable
-    to prevent the saving of an otherwise cacheable response.
-      trunk:
-        http://svn.apache.org/viewvc?rev=729316&view=rev
-        http://svn.apache.org/viewvc?rev=729317&view=rev
-      2.2.x:
-        trunk works
-    +1 covener, rpluem, niq
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 31795e8dda2d7693558aa7b4d985a9528c42b5ab..f1014d95fd064d0f45808c0d354acda37183e4ae 100644 (file)
 
     
 
+    <h3><a name="no-cache" id="no-cache">no-cache</a></h3>
+
+        <p>When set, <code class="module"><a href="./mod/mod_cache.html">mod_cache</a></code> will not save an otherwise
+        cacheable response.  This environment variable does not influence
+        whether a response already in the cache will be served for the current 
+        request.</p>
+
+    
+
     <h3><a name="nokeepalive" id="nokeepalive">nokeepalive</a></h3>
         
 
index 0e3acf3271be4397afec15f2eb0abbf9c928c235..e98732d8b7caa80eb0f8f7dea5076c539a27d8bd 100644 (file)
 
     </section>
 
+    <section id="no-cache"><title>no-cache</title>
+
+        <p>When set, <module>mod_cache</module> will not save an otherwise
+        cacheable response.  This environment variable does not influence
+        whether a response already in the cache will be served for the current 
+        request.</p>
+
+    </section>
+
     <section id="nokeepalive">
         <title>nokeepalive</title>
 
index 9bc6739feadde00caadd6ad990b300da43cf8443..3e69b2b95ebc819e2051da4c3cd2935dde8c8a4b 100644 (file)
       CacheDisable /local_files
     </code></p></div>
 
+    <p> The <code>no-cache</code> environment variable can be set to 
+    disable caching on a finer grained set of resources.</p>
+
+<h3>See also</h3>
+<ul>
+<li><a href="../env.html">Environment Variables in Apache</a></li>
+</ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="CacheEnable" id="CacheEnable">CacheEnable</a> <a name="cacheenable" id="cacheenable">Directive</a></h2>
@@ -213,7 +220,14 @@ manager</td></tr>
       CacheEnable  disk  http://www.apache.org/<br />
     </code></p></div>
 
+    <p> The <code>no-cache</code> environment variable can be set to 
+    disable caching on a finer grained set of resources.</p>
 
+
+<h3>See also</h3>
+<ul>
+<li><a href="../env.html">Environment Variables in Apache</a></li>
+</ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="CacheIgnoreCacheControl" id="CacheIgnoreCacheControl">CacheIgnoreCacheControl</a> <a name="cacheignorecachecontrol" id="cacheignorecachecontrol">Directive</a></h2>
index 09aac5efffe3765c333ceb431a341f932cc3b4b2..e0f3f3297d170960d85f6cb75bd66b88ee22079a 100644 (file)
@@ -172,7 +172,11 @@ manager</description>
       CacheEnable  disk  http://www.apache.org/<br />
     </example>
 
+    <p> The <code>no-cache</code> environment variable can be set to 
+    disable caching on a finer grained set of resources.</p>
+
 </usage>
+<seealso><a href="../env.html">Environment Variables in Apache</a></seealso>
 </directivesynopsis>
 
 <directivesynopsis>
@@ -190,8 +194,11 @@ manager</description>
     <example><title>Example</title>
       CacheDisable /local_files
     </example>
-</usage>
 
+    <p> The <code>no-cache</code> environment variable can be set to 
+    disable caching on a finer grained set of resources.</p>
+</usage>
+<seealso><a href="../env.html">Environment Variables in Apache</a></seealso>
 </directivesynopsis>
 <directivesynopsis>
 <name>CacheMaxExpire</name>
index 257536e2332e19c6585ad4e8a50722e8135ae466..a35b2abc6027f4ca7f8ae3c1b865a6399bb90702 100644 (file)
@@ -540,6 +540,9 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
                               "*", NULL)) {
         reason = "Vary header contains '*'";
     }
+    else if (apr_table_get(r->subprocess_env, "no-cache") != NULL) { 
+        reason = "environment variable 'no-cache' is set";
+    }
     else if (r->no_cache) {
         /* or we've been asked not to cache it above */
         reason = "r->no_cache present";