Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
5948:f2ff0aa89126 | 5949:634da79665d3 |
---|---|
778 | 778 |
779 c = r->cache; | 779 c = r->cache; |
780 | 780 |
781 c->min_uses = u->conf->cache_min_uses; | 781 c->min_uses = u->conf->cache_min_uses; |
782 c->body_start = u->conf->buffer_size; | 782 c->body_start = u->conf->buffer_size; |
783 c->file_cache = u->conf->cache->data; | 783 c->file_cache = u->conf->cache_zone->data; |
784 | 784 |
785 c->lock = u->conf->cache_lock; | 785 c->lock = u->conf->cache_lock; |
786 c->lock_timeout = u->conf->cache_lock_timeout; | 786 c->lock_timeout = u->conf->cache_lock_timeout; |
787 c->lock_age = u->conf->cache_lock_age; | 787 c->lock_age = u->conf->cache_lock_age; |
788 | 788 |
2536 | 2536 |
2537 if (u->cache_status == NGX_HTTP_CACHE_BYPASS) { | 2537 if (u->cache_status == NGX_HTTP_CACHE_BYPASS) { |
2538 | 2538 |
2539 r->cache->min_uses = u->conf->cache_min_uses; | 2539 r->cache->min_uses = u->conf->cache_min_uses; |
2540 r->cache->body_start = u->conf->buffer_size; | 2540 r->cache->body_start = u->conf->buffer_size; |
2541 r->cache->file_cache = u->conf->cache->data; | 2541 r->cache->file_cache = u->conf->cache_zone->data; |
2542 | 2542 |
2543 if (ngx_http_file_cache_create(r) != NGX_OK) { | 2543 if (ngx_http_file_cache_create(r) != NGX_OK) { |
2544 ngx_http_upstream_finalize_request(r, u, NGX_ERROR); | 2544 ngx_http_upstream_finalize_request(r, u, NGX_ERROR); |
2545 return; | 2545 return; |
2546 } | 2546 } |
5543 | 5543 |
5544 conf->hide_headers_hash = prev->hide_headers_hash; | 5544 conf->hide_headers_hash = prev->hide_headers_hash; |
5545 | 5545 |
5546 if (conf->hide_headers_hash.buckets | 5546 if (conf->hide_headers_hash.buckets |
5547 #if (NGX_HTTP_CACHE) | 5547 #if (NGX_HTTP_CACHE) |
5548 && ((conf->cache == NULL) == (prev->cache == NULL)) | 5548 && ((conf->cache == 0) == (prev->cache == 0)) |
5549 #endif | 5549 #endif |
5550 ) | 5550 ) |
5551 { | 5551 { |
5552 return NGX_OK; | 5552 return NGX_OK; |
5553 } | 5553 } |