comparison src/http/modules/ngx_http_proxy_module.c @ 3526:62a4fd1e6e2c

proxy_no_cache and fastcgi_no_cache
author Igor Sysoev <igor@sysoev.ru>
date Mon, 24 May 2010 11:01:05 +0000
parents 66a244ee8cf7
children 20708cffd6dc
comparison
equal deleted inserted replaced
3525:eb156d98a9fa 3526:62a4fd1e6e2c
356 NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE, 356 NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
357 ngx_http_file_cache_set_slot, 357 ngx_http_file_cache_set_slot,
358 0, 358 0,
359 0, 359 0,
360 &ngx_http_proxy_module }, 360 &ngx_http_proxy_module },
361
362 { ngx_string("proxy_no_cache"),
363 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
364 ngx_http_no_cache_set_slot,
365 NGX_HTTP_LOC_CONF_OFFSET,
366 offsetof(ngx_http_proxy_loc_conf_t, upstream.no_cache),
367 NULL },
361 368
362 { ngx_string("proxy_cache_valid"), 369 { ngx_string("proxy_cache_valid"),
363 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 370 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
364 ngx_http_file_cache_valid_set_slot, 371 ngx_http_file_cache_valid_set_slot,
365 NGX_HTTP_LOC_CONF_OFFSET, 372 NGX_HTTP_LOC_CONF_OFFSET,
1915 conf->upstream.pass_request_body = NGX_CONF_UNSET; 1922 conf->upstream.pass_request_body = NGX_CONF_UNSET;
1916 1923
1917 #if (NGX_HTTP_CACHE) 1924 #if (NGX_HTTP_CACHE)
1918 conf->upstream.cache = NGX_CONF_UNSET_PTR; 1925 conf->upstream.cache = NGX_CONF_UNSET_PTR;
1919 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; 1926 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
1927 conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
1920 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; 1928 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
1921 #endif 1929 #endif
1922 1930
1923 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; 1931 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR;
1924 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; 1932 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR;
2138 2146
2139 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { 2147 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) {
2140 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET 2148 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET
2141 |NGX_HTTP_UPSTREAM_FT_OFF; 2149 |NGX_HTTP_UPSTREAM_FT_OFF;
2142 } 2150 }
2151
2152 ngx_conf_merge_ptr_value(conf->upstream.no_cache,
2153 prev->upstream.no_cache, NULL);
2143 2154
2144 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, 2155 ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
2145 prev->upstream.cache_valid, NULL); 2156 prev->upstream.cache_valid, NULL);
2146 2157
2147 if (conf->cache_key.value.data == NULL) { 2158 if (conf->cache_key.value.data == NULL) {