httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r572626 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/cache/cache_storage.c
Date Tue, 04 Sep 2007 11:35:35 GMT
Author: jim
Date: Tue Sep  4 04:35:35 2007
New Revision: 572626

URL: http://svn.apache.org/viewvc?rev=572626&view=rev
Log:
Merge r481886 from trunk:

* Remove expired content from cache that cannot be revalidated.

PR: 30370

Submitted by: rpluem
Reviewed by: jim

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/cache/cache_storage.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=572626&r1=572625&r2=572626&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Sep  4 04:35:35 2007
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.6
 
+  *) mod_cache: Remove expired content from cache that cannot be revalidated.
+     PR 30370. [Ruediger Pluem]
+
   *) mod_proxy_http: accept proxy-sendchunked/proxy-sendchunks as synonymous.
      PR 43183 [Brian Rectanus <Brian.Rectanus breach.com>, Vincent Bray]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=572626&r1=572625&r2=572626&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Tue Sep  4 04:35:35 2007
@@ -80,14 +80,6 @@
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
 
-    * mod_cache: Remove expired content from cache that cannot be revalidated.
-      PR 30370.
-      Trunk version of patch:
-         http://svn.apache.org/viewcvs.cgi?rev=481886&view=rev
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works
-      +1: rpluem, fielding, jim
-
     * mod_mem_cache: Increase the minimum and default value for
       MCacheMinObjectSize from 0 to 1, as a MCacheMinObjectSize of 0 does
       not make sense and leads to a signal Floating point exception (8)

Modified: httpd/httpd/branches/2.2.x/modules/cache/cache_storage.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/cache_storage.c?rev=572626&r1=572625&r2=572626&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/cache/cache_storage.c (original)
+++ httpd/httpd/branches/2.2.x/modules/cache/cache_storage.c Tue Sep  4 04:35:35 2007
@@ -304,6 +304,20 @@
                     }
                     cache->stale_handle = h;
                 }
+                else {
+                    int irv;
+
+                    /*
+                     * The copy isn't fresh enough, but we cannot revalidate.
+                     * So it is the same case as if there had not been a cached
+                     * entry at all. Thus delete the entry from cache.
+                     */
+                    irv = cache->provider->remove_url(h, r->pool);
+                    if (irv != OK) {
+                        ap_log_error(APLOG_MARK, APLOG_DEBUG, irv, r->server,
+                                     "cache: attempt to remove url from cache unsuccessful.");
+                    }
+                }
 
                 return DECLINED;
             }



Mime
View raw message