httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1004373 - /httpd/httpd/trunk/modules/cache/cache_storage.c
Date Mon, 04 Oct 2010 19:27:23 GMT
Author: minfrin
Date: Mon Oct  4 19:27:22 2010
New Revision: 1004373

URL: http://svn.apache.org/viewvc?rev=1004373&view=rev
Log:
mod_cache: Don't regenerate the cache key if we have already generated it.

Modified:
    httpd/httpd/trunk/modules/cache/cache_storage.c

Modified: httpd/httpd/trunk/modules/cache/cache_storage.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_storage.c?rev=1004373&r1=1004372&r2=1004373&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_storage.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_storage.c Mon Oct  4 19:27:22 2010
@@ -84,9 +84,11 @@ int cache_create_entity(cache_request_re
         return APR_EGENERAL;
     }
 
-    rv = cache_generate_key(r, r->pool, &cache->key);
-    if (rv != APR_SUCCESS) {
-        return rv;
+    if (!cache->key) {
+        rv = cache_generate_key(r, r->pool, &cache->key);
+        if (rv != APR_SUCCESS) {
+            return rv;
+        }
     }
 
     list = cache->providers;
@@ -207,9 +209,11 @@ int cache_select(cache_request_rec *cach
         return APR_EGENERAL;
     }
 
-    rv = cache_generate_key(r, r->pool, &cache->key);
-    if (rv != APR_SUCCESS) {
-        return rv;
+    if (!cache->key) {
+        rv = cache_generate_key(r, r->pool, &cache->key);
+        if (rv != APR_SUCCESS) {
+            return rv;
+        }
     }
 
     if (!ap_cache_check_allowed(r)) {



Mime
View raw message