You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2006/12/03 21:51:15 UTC
svn commit: r481886 - in /httpd/httpd/trunk: CHANGES
modules/cache/cache_storage.c
Author: rpluem
Date: Sun Dec 3 12:51:13 2006
New Revision: 481886
URL: http://svn.apache.org/viewvc?view=rev&rev=481886
Log:
* Remove expired content from cache that cannot be revalidated.
PR: 30370
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/cache/cache_storage.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=481886&r1=481885&r2=481886
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Dec 3 12:51:13 2006
@@ -2,6 +2,9 @@
Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) mod_cache: Remove expired content from cache that cannot be revalidated.
+ PR 30370. [Ruediger Pluem]
+
*) mod_dbd: Stash DBD connections in request_config of initial request
only, or else sub-requests and internal redirections may cause
entire DBD pool to be stashed in a single HTTP request. [Chris Darroch]
Modified: httpd/httpd/trunk/modules/cache/cache_storage.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_storage.c?view=diff&rev=481886&r1=481885&r2=481886
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_storage.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_storage.c Sun Dec 3 12:51:13 2006
@@ -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;
}