You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2010/10/13 00:43:49 UTC
svn commit: r1021944 - /httpd/httpd/trunk/modules/cache/mod_cache.c
Author: minfrin
Date: Tue Oct 12 22:43:49 2010
New Revision: 1021944
URL: http://svn.apache.org/viewvc?rev=1021944&view=rev
Log:
Make sure we remove the cache lock consistently as soon as we've started
down the error path, so that we don't delay the next attempt to cache.
Modified:
httpd/httpd/trunk/modules/cache/mod_cache.c
Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1021944&r1=1021943&r2=1021944&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Tue Oct 12 22:43:49 2010
@@ -1543,6 +1543,10 @@ static void cache_insert_error_filter(re
NULL, apr_table_get(cache->stale_handle->resp_hdrs,
"Cache-Control"), "must-revalidate", NULL)) {
const char *warn_head;
+ cache_server_conf
+ *conf =
+ (cache_server_conf *) ap_get_module_config(r->server->module_config,
+ &cache_module);
/* morph the current save filter into the out filter, and serve from
* cache.
@@ -1579,6 +1583,9 @@ static void cache_insert_error_filter(re
"cache hit: %d status; stale content returned",
r->status));
+ /* give someone else the chance to cache the file */
+ cache_remove_lock(conf, cache, r, NULL);
+
}
}