Mercurial > hg > nginx
comparison src/http/modules/ngx_http_uwsgi_module.c @ 4386:92deb73393f7
Cache lock support for fastcgi, scgi, uwsgi.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 26 Dec 2011 11:16:19 +0000 |
parents | 5ee5ddec17b1 |
children | d45742815c90 |
comparison
equal
deleted
inserted
replaced
4385:70ba81827472 | 4386:92deb73393f7 |
---|---|
271 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, | 271 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, |
272 ngx_conf_set_bitmask_slot, | 272 ngx_conf_set_bitmask_slot, |
273 NGX_HTTP_LOC_CONF_OFFSET, | 273 NGX_HTTP_LOC_CONF_OFFSET, |
274 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_methods), | 274 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_methods), |
275 &ngx_http_upstream_cache_method_mask }, | 275 &ngx_http_upstream_cache_method_mask }, |
276 | |
277 { ngx_string("uwsgi_cache_lock"), | |
278 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
279 ngx_conf_set_flag_slot, | |
280 NGX_HTTP_LOC_CONF_OFFSET, | |
281 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_lock), | |
282 NULL }, | |
283 | |
284 { ngx_string("uwsgi_cache_lock_timeout"), | |
285 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | |
286 ngx_conf_set_msec_slot, | |
287 NGX_HTTP_LOC_CONF_OFFSET, | |
288 offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_lock_timeout), | |
289 NULL }, | |
276 | 290 |
277 #endif | 291 #endif |
278 | 292 |
279 { ngx_string("uwsgi_temp_path"), | 293 { ngx_string("uwsgi_temp_path"), |
280 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, | 294 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, |
1112 conf->upstream.cache = NGX_CONF_UNSET_PTR; | 1126 conf->upstream.cache = NGX_CONF_UNSET_PTR; |
1113 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; | 1127 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; |
1114 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR; | 1128 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR; |
1115 conf->upstream.no_cache = NGX_CONF_UNSET_PTR; | 1129 conf->upstream.no_cache = NGX_CONF_UNSET_PTR; |
1116 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; | 1130 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; |
1131 conf->upstream.cache_lock = NGX_CONF_UNSET; | |
1132 conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC; | |
1117 #endif | 1133 #endif |
1118 | 1134 |
1119 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; | 1135 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; |
1120 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; | 1136 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; |
1121 | 1137 |
1338 prev->upstream.cache_valid, NULL); | 1354 prev->upstream.cache_valid, NULL); |
1339 | 1355 |
1340 if (conf->cache_key.value.data == NULL) { | 1356 if (conf->cache_key.value.data == NULL) { |
1341 conf->cache_key = prev->cache_key; | 1357 conf->cache_key = prev->cache_key; |
1342 } | 1358 } |
1359 | |
1360 ngx_conf_merge_value(conf->upstream.cache_lock, | |
1361 prev->upstream.cache_lock, 0); | |
1362 | |
1363 ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout, | |
1364 prev->upstream.cache_lock_timeout, 5000); | |
1343 | 1365 |
1344 #endif | 1366 #endif |
1345 | 1367 |
1346 ngx_conf_merge_value(conf->upstream.pass_request_headers, | 1368 ngx_conf_merge_value(conf->upstream.pass_request_headers, |
1347 prev->upstream.pass_request_headers, 1); | 1369 prev->upstream.pass_request_headers, 1); |