diff src/http/ngx_http_upstream.c @ 5949:634da79665d3

Upstream: refactored proxy_cache and friends. The configuration handling code has changed to look similar to the proxy_store directive and friends. This simplifies adding variable support in the following patch. No functional changes.
author Valentin Bartenev <vbart@nginx.com>
date Mon, 22 Dec 2014 12:59:02 +0300
parents d9025ea1f5a5
children eaeecf00d5d7
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -780,7 +780,7 @@ ngx_http_upstream_cache(ngx_http_request
 
         c->min_uses = u->conf->cache_min_uses;
         c->body_start = u->conf->buffer_size;
-        c->file_cache = u->conf->cache->data;
+        c->file_cache = u->conf->cache_zone->data;
 
         c->lock = u->conf->cache_lock;
         c->lock_timeout = u->conf->cache_lock_timeout;
@@ -2538,7 +2538,7 @@ ngx_http_upstream_send_response(ngx_http
 
             r->cache->min_uses = u->conf->cache_min_uses;
             r->cache->body_start = u->conf->buffer_size;
-            r->cache->file_cache = u->conf->cache->data;
+            r->cache->file_cache = u->conf->cache_zone->data;
 
             if (ngx_http_file_cache_create(r) != NGX_OK) {
                 ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
@@ -5545,7 +5545,7 @@ ngx_http_upstream_hide_headers_hash(ngx_
 
         if (conf->hide_headers_hash.buckets
 #if (NGX_HTTP_CACHE)
-            && ((conf->cache == NULL) == (prev->cache == NULL))
+            && ((conf->cache == 0) == (prev->cache == 0))
 #endif
            )
         {