]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make sure we remove the cache lock consistently as soon as we've started
authorGraham Leggett <minfrin@apache.org>
Tue, 12 Oct 2010 22:43:49 +0000 (22:43 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 12 Oct 2010 22:43:49 +0000 (22:43 +0000)
down the error path, so that we don't delay the next attempt to cache.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021944 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_cache.c

index a86d0adefa628836a12b8b92df7da1cedac433b8..902341692419bccfd4cfc1f15bb67dd6698a3723 100644 (file)
@@ -1543,6 +1543,10 @@ static void cache_insert_error_filter(request_rec *r)
                 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(request_rec *r)
                             "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);
+
         }
     }