comparison src/http/modules/ngx_http_scgi_module.c @ 588:b6a5942a4e6a NGINX_0_8_46

nginx 0.8.46 *) Change: now the "proxy_no_cache", "fastcgi_no_cache", "uwsgi_no_cache", and "scgi_no_cache" directives affect on a cached response saving only. *) Feature: the "proxy_cache_bypass", "fastcgi_cache_bypass", "uwsgi_cache_bypass", and "scgi_cache_bypass" directives. *) Bugfix: nginx did not free memory in cache keys zones if there was an error during working with backend: the memory was freed only after inactivity time or on memory low condition.
author Igor Sysoev <http://sysoev.ru>
date Mon, 19 Jul 2010 00:00:00 +0400
parents 016632f0fb18
children 09d5f308901f
comparison
equal deleted inserted replaced
587:913af46ee783 588:b6a5942a4e6a
194 ngx_http_file_cache_set_slot, 194 ngx_http_file_cache_set_slot,
195 0, 195 0,
196 0, 196 0,
197 &ngx_http_scgi_module }, 197 &ngx_http_scgi_module },
198 198
199 { ngx_string("scgi_cache_bypass"),
200 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
201 ngx_http_set_predicate_slot,
202 NGX_HTTP_LOC_CONF_OFFSET,
203 offsetof(ngx_http_scgi_loc_conf_t, upstream.cache_bypass),
204 NULL },
205
199 { ngx_string("scgi_no_cache"), 206 { ngx_string("scgi_no_cache"),
200 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 207 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
201 ngx_http_no_cache_set_slot, 208 ngx_http_set_predicate_slot,
202 NGX_HTTP_LOC_CONF_OFFSET, 209 NGX_HTTP_LOC_CONF_OFFSET,
203 offsetof(ngx_http_scgi_loc_conf_t, upstream.no_cache), 210 offsetof(ngx_http_scgi_loc_conf_t, upstream.no_cache),
204 NULL }, 211 NULL },
205 212
206 { ngx_string("scgi_cache_valid"), 213 { ngx_string("scgi_cache_valid"),
1013 conf->upstream.pass_request_body = NGX_CONF_UNSET; 1020 conf->upstream.pass_request_body = NGX_CONF_UNSET;
1014 1021
1015 #if (NGX_HTTP_CACHE) 1022 #if (NGX_HTTP_CACHE)
1016 conf->upstream.cache = NGX_CONF_UNSET_PTR; 1023 conf->upstream.cache = NGX_CONF_UNSET_PTR;
1017 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; 1024 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
1025 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR;
1026 conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
1018 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; 1027 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
1019 #endif 1028 #endif
1020 1029
1021 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; 1030 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR;
1022 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; 1031 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR;
1231 conf->upstream.cache_methods = prev->upstream.cache_methods; 1240 conf->upstream.cache_methods = prev->upstream.cache_methods;
1232 } 1241 }
1233 1242
1234 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; 1243 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;
1235 1244
1245 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass,
1246 prev->upstream.cache_bypass, NULL);
1247
1236 ngx_conf_merge_ptr_value(conf->upstream.no_cache, 1248 ngx_conf_merge_ptr_value(conf->upstream.no_cache,
1237 prev->upstream.no_cache, NULL); 1249 prev->upstream.no_cache, NULL);
1238 1250
1239 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, 1251 ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
1240 prev->upstream.cache_valid, NULL); 1252 prev->upstream.cache_valid, NULL);