comparison src/http/modules/ngx_http_proxy_module.c @ 6906:1aeaae6e9446

Upstream: proxy_cache_background_update and friends. The directives enable cache updates in subrequests.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 10 Feb 2017 15:13:41 +0300
parents 0fba3ed4e7eb
children fa56ab75cffc
comparison
equal deleted inserted replaced
6905:9a9e13686869 6906:1aeaae6e9446
544 { ngx_string("proxy_cache_convert_head"), 544 { ngx_string("proxy_cache_convert_head"),
545 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 545 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
546 ngx_conf_set_flag_slot, 546 ngx_conf_set_flag_slot,
547 NGX_HTTP_LOC_CONF_OFFSET, 547 NGX_HTTP_LOC_CONF_OFFSET,
548 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_convert_head), 548 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_convert_head),
549 NULL },
550
551 { ngx_string("proxy_cache_background_update"),
552 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
553 ngx_conf_set_flag_slot,
554 NGX_HTTP_LOC_CONF_OFFSET,
555 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_background_update),
549 NULL }, 556 NULL },
550 557
551 #endif 558 #endif
552 559
553 { ngx_string("proxy_temp_path"), 560 { ngx_string("proxy_temp_path"),
2861 conf->upstream.cache_lock = NGX_CONF_UNSET; 2868 conf->upstream.cache_lock = NGX_CONF_UNSET;
2862 conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC; 2869 conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
2863 conf->upstream.cache_lock_age = NGX_CONF_UNSET_MSEC; 2870 conf->upstream.cache_lock_age = NGX_CONF_UNSET_MSEC;
2864 conf->upstream.cache_revalidate = NGX_CONF_UNSET; 2871 conf->upstream.cache_revalidate = NGX_CONF_UNSET;
2865 conf->upstream.cache_convert_head = NGX_CONF_UNSET; 2872 conf->upstream.cache_convert_head = NGX_CONF_UNSET;
2873 conf->upstream.cache_background_update = NGX_CONF_UNSET;
2866 #endif 2874 #endif
2867 2875
2868 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; 2876 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR;
2869 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; 2877 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR;
2870 2878
3165 ngx_conf_merge_value(conf->upstream.cache_revalidate, 3173 ngx_conf_merge_value(conf->upstream.cache_revalidate,
3166 prev->upstream.cache_revalidate, 0); 3174 prev->upstream.cache_revalidate, 0);
3167 3175
3168 ngx_conf_merge_value(conf->upstream.cache_convert_head, 3176 ngx_conf_merge_value(conf->upstream.cache_convert_head,
3169 prev->upstream.cache_convert_head, 1); 3177 prev->upstream.cache_convert_head, 1);
3178
3179 ngx_conf_merge_value(conf->upstream.cache_background_update,
3180 prev->upstream.cache_background_update, 0);
3170 3181
3171 #endif 3182 #endif
3172 3183
3173 if (conf->method == NULL) { 3184 if (conf->method == NULL) {
3174 conf->method = prev->method; 3185 conf->method = prev->method;