comparison src/http/modules/ngx_http_fastcgi_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 83c9a10ec029
comparison
equal deleted inserted replaced
3525:eb156d98a9fa 3526:62a4fd1e6e2c
333 NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE, 333 NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
334 ngx_http_file_cache_set_slot, 334 ngx_http_file_cache_set_slot,
335 0, 335 0,
336 0, 336 0,
337 &ngx_http_fastcgi_module }, 337 &ngx_http_fastcgi_module },
338
339 { ngx_string("fastcgi_no_cache"),
340 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
341 ngx_http_no_cache_set_slot,
342 NGX_HTTP_LOC_CONF_OFFSET,
343 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.no_cache),
344 NULL },
338 345
339 { ngx_string("fastcgi_cache_valid"), 346 { ngx_string("fastcgi_cache_valid"),
340 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 347 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
341 ngx_http_file_cache_valid_set_slot, 348 ngx_http_file_cache_valid_set_slot,
342 NGX_HTTP_LOC_CONF_OFFSET, 349 NGX_HTTP_LOC_CONF_OFFSET,
1921 conf->upstream.pass_request_body = NGX_CONF_UNSET; 1928 conf->upstream.pass_request_body = NGX_CONF_UNSET;
1922 1929
1923 #if (NGX_HTTP_CACHE) 1930 #if (NGX_HTTP_CACHE)
1924 conf->upstream.cache = NGX_CONF_UNSET_PTR; 1931 conf->upstream.cache = NGX_CONF_UNSET_PTR;
1925 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; 1932 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
1933 conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
1926 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; 1934 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
1927 #endif 1935 #endif
1928 1936
1929 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; 1937 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR;
1930 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; 1938 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR;
2142 conf->upstream.cache_methods = prev->upstream.cache_methods; 2150 conf->upstream.cache_methods = prev->upstream.cache_methods;
2143 } 2151 }
2144 2152
2145 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; 2153 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;
2146 2154
2155 ngx_conf_merge_ptr_value(conf->upstream.no_cache,
2156 prev->upstream.no_cache, NULL);
2157
2147 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, 2158 ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
2148 prev->upstream.cache_valid, NULL); 2159 prev->upstream.cache_valid, NULL);
2149 2160
2150 if (conf->cache_key.value.data == NULL) { 2161 if (conf->cache_key.value.data == NULL) {
2151 conf->cache_key = prev->cache_key; 2162 conf->cache_key = prev->cache_key;