Mercurial > hg > nginx-mail
comparison src/http/modules/ngx_http_fastcgi_module.c @ 631: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
630:913af46ee783 | 631:b6a5942a4e6a |
---|---|
328 ngx_http_file_cache_set_slot, | 328 ngx_http_file_cache_set_slot, |
329 0, | 329 0, |
330 0, | 330 0, |
331 &ngx_http_fastcgi_module }, | 331 &ngx_http_fastcgi_module }, |
332 | 332 |
333 { ngx_string("fastcgi_cache_bypass"), | |
334 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, | |
335 ngx_http_set_predicate_slot, | |
336 NGX_HTTP_LOC_CONF_OFFSET, | |
337 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_bypass), | |
338 NULL }, | |
339 | |
333 { ngx_string("fastcgi_no_cache"), | 340 { ngx_string("fastcgi_no_cache"), |
334 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, | 341 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, |
335 ngx_http_no_cache_set_slot, | 342 ngx_http_set_predicate_slot, |
336 NGX_HTTP_LOC_CONF_OFFSET, | 343 NGX_HTTP_LOC_CONF_OFFSET, |
337 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.no_cache), | 344 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.no_cache), |
338 NULL }, | 345 NULL }, |
339 | 346 |
340 { ngx_string("fastcgi_cache_valid"), | 347 { ngx_string("fastcgi_cache_valid"), |
1983 conf->upstream.pass_request_body = NGX_CONF_UNSET; | 1990 conf->upstream.pass_request_body = NGX_CONF_UNSET; |
1984 | 1991 |
1985 #if (NGX_HTTP_CACHE) | 1992 #if (NGX_HTTP_CACHE) |
1986 conf->upstream.cache = NGX_CONF_UNSET_PTR; | 1993 conf->upstream.cache = NGX_CONF_UNSET_PTR; |
1987 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; | 1994 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; |
1995 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR; | |
1988 conf->upstream.no_cache = NGX_CONF_UNSET_PTR; | 1996 conf->upstream.no_cache = NGX_CONF_UNSET_PTR; |
1989 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; | 1997 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; |
1990 #endif | 1998 #endif |
1991 | 1999 |
1992 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; | 2000 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; |
2206 conf->upstream.cache_methods = prev->upstream.cache_methods; | 2214 conf->upstream.cache_methods = prev->upstream.cache_methods; |
2207 } | 2215 } |
2208 | 2216 |
2209 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; | 2217 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; |
2210 | 2218 |
2219 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, | |
2220 prev->upstream.cache_bypass, NULL); | |
2221 | |
2211 ngx_conf_merge_ptr_value(conf->upstream.no_cache, | 2222 ngx_conf_merge_ptr_value(conf->upstream.no_cache, |
2212 prev->upstream.no_cache, NULL); | 2223 prev->upstream.no_cache, NULL); |
2224 | |
2225 if (conf->upstream.no_cache && conf->upstream.cache_bypass == NULL) { | |
2226 ngx_log_error(NGX_LOG_WARN, cf->log, 0, | |
2227 "\"fastcgi_no_cache\" functionality has been changed in 0.8.46, " | |
2228 "now it should be used together with \"fastcgi_cache_bypass\""); | |
2229 } | |
2213 | 2230 |
2214 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, | 2231 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, |
2215 prev->upstream.cache_valid, NULL); | 2232 prev->upstream.cache_valid, NULL); |
2216 | 2233 |
2217 if (conf->cache_key.value.data == NULL) { | 2234 if (conf->cache_key.value.data == NULL) { |