comparison src/http/modules/ngx_http_uwsgi_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
221 ngx_http_file_cache_set_slot, 221 ngx_http_file_cache_set_slot,
222 0, 222 0,
223 0, 223 0,
224 &ngx_http_uwsgi_module }, 224 &ngx_http_uwsgi_module },
225 225
226 { ngx_string("uwsgi_cache_bypass"),
227 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
228 ngx_http_set_predicate_slot,
229 NGX_HTTP_LOC_CONF_OFFSET,
230 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_bypass),
231 NULL },
232
226 { ngx_string("uwsgi_no_cache"), 233 { ngx_string("uwsgi_no_cache"),
227 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 234 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
228 ngx_http_no_cache_set_slot, 235 ngx_http_set_predicate_slot,
229 NGX_HTTP_LOC_CONF_OFFSET, 236 NGX_HTTP_LOC_CONF_OFFSET,
230 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.no_cache), 237 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.no_cache),
231 NULL }, 238 NULL },
232 239
233 { ngx_string("uwsgi_cache_valid"), 240 { ngx_string("uwsgi_cache_valid"),
1066 conf->upstream.pass_request_body = NGX_CONF_UNSET; 1073 conf->upstream.pass_request_body = NGX_CONF_UNSET;
1067 1074
1068 #if (NGX_HTTP_CACHE) 1075 #if (NGX_HTTP_CACHE)
1069 conf->upstream.cache = NGX_CONF_UNSET_PTR; 1076 conf->upstream.cache = NGX_CONF_UNSET_PTR;
1070 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; 1077 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
1078 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR;
1079 conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
1071 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; 1080 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
1072 #endif 1081 #endif
1073 1082
1074 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; 1083 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR;
1075 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; 1084 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR;
1284 conf->upstream.cache_methods = prev->upstream.cache_methods; 1293 conf->upstream.cache_methods = prev->upstream.cache_methods;
1285 } 1294 }
1286 1295
1287 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; 1296 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;
1288 1297
1298 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass,
1299 prev->upstream.cache_bypass, NULL);
1300
1289 ngx_conf_merge_ptr_value(conf->upstream.no_cache, 1301 ngx_conf_merge_ptr_value(conf->upstream.no_cache,
1290 prev->upstream.no_cache, NULL); 1302 prev->upstream.no_cache, NULL);
1291 1303
1292 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, 1304 ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
1293 prev->upstream.cache_valid, NULL); 1305 prev->upstream.cache_valid, NULL);