Mercurial > hg > nginx-vendor-current
diff 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 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -223,9 +223,16 @@ static ngx_command_t ngx_http_uwsgi_comm 0, &ngx_http_uwsgi_module }, + { ngx_string("uwsgi_cache_bypass"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, + ngx_http_set_predicate_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_bypass), + NULL }, + { ngx_string("uwsgi_no_cache"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, - ngx_http_no_cache_set_slot, + ngx_http_set_predicate_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_uwsgi_loc_conf_t, upstream.no_cache), NULL }, @@ -1068,6 +1075,8 @@ ngx_http_uwsgi_create_loc_conf(ngx_conf_ #if (NGX_HTTP_CACHE) conf->upstream.cache = NGX_CONF_UNSET_PTR; conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; + conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR; + conf->upstream.no_cache = NGX_CONF_UNSET_PTR; conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; #endif @@ -1286,6 +1295,9 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; + ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, + prev->upstream.cache_bypass, NULL); + ngx_conf_merge_ptr_value(conf->upstream.no_cache, prev->upstream.no_cache, NULL);