Mercurial > hg > nginx
comparison src/http/modules/ngx_http_fastcgi_module.c @ 2875:6e1941b321b7
proxy_cache_methods and fastcgi_cache_methods
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 19 May 2009 13:27:27 +0000 |
parents | 4e002555652d |
children | d26f4e80c71f f892042956e3 |
comparison
equal
deleted
inserted
replaced
2874:e16e03d62435 | 2875:6e1941b321b7 |
---|---|
350 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, | 350 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, |
351 ngx_conf_set_bitmask_slot, | 351 ngx_conf_set_bitmask_slot, |
352 NGX_HTTP_LOC_CONF_OFFSET, | 352 NGX_HTTP_LOC_CONF_OFFSET, |
353 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_use_stale), | 353 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_use_stale), |
354 &ngx_http_fastcgi_next_upstream_masks }, | 354 &ngx_http_fastcgi_next_upstream_masks }, |
355 | |
356 { ngx_string("fastcgi_cache_methods"), | |
357 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, | |
358 ngx_conf_set_bitmask_slot, | |
359 NGX_HTTP_LOC_CONF_OFFSET, | |
360 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_methods), | |
361 &ngx_http_upstream_cache_method_mask }, | |
355 | 362 |
356 #endif | 363 #endif |
357 | 364 |
358 { ngx_string("fastcgi_temp_path"), | 365 { ngx_string("fastcgi_temp_path"), |
359 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, | 366 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, |
1833 * set by ngx_pcalloc(): | 1840 * set by ngx_pcalloc(): |
1834 * | 1841 * |
1835 * conf->upstream.bufs.num = 0; | 1842 * conf->upstream.bufs.num = 0; |
1836 * conf->upstream.ignore_headers = 0; | 1843 * conf->upstream.ignore_headers = 0; |
1837 * conf->upstream.next_upstream = 0; | 1844 * conf->upstream.next_upstream = 0; |
1838 * conf->upstream.use_stale_cache = 0; | 1845 * conf->upstream.cache_use_stale = 0; |
1846 * conf->upstream.cache_methods = 0; | |
1839 * conf->upstream.temp_path = NULL; | 1847 * conf->upstream.temp_path = NULL; |
1840 * conf->upstream.hide_headers_hash = { NULL, 0 }; | 1848 * conf->upstream.hide_headers_hash = { NULL, 0 }; |
1841 * conf->upstream.uri = { 0, NULL }; | 1849 * conf->upstream.uri = { 0, NULL }; |
1842 * conf->upstream.location = NULL; | 1850 * conf->upstream.location = NULL; |
1843 * conf->upstream.store_lengths = NULL; | 1851 * conf->upstream.store_lengths = NULL; |
2081 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { | 2089 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { |
2082 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET | 2090 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET |
2083 |NGX_HTTP_UPSTREAM_FT_OFF; | 2091 |NGX_HTTP_UPSTREAM_FT_OFF; |
2084 } | 2092 } |
2085 | 2093 |
2094 if (conf->upstream.cache_methods == 0) { | |
2095 conf->upstream.cache_methods = prev->upstream.cache_methods; | |
2096 } | |
2097 | |
2098 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; | |
2099 | |
2086 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, | 2100 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, |
2087 prev->upstream.cache_valid, NULL); | 2101 prev->upstream.cache_valid, NULL); |
2088 | 2102 |
2089 if (conf->cache_key.value.data == NULL) { | 2103 if (conf->cache_key.value.data == NULL) { |
2090 conf->cache_key = prev->cache_key; | 2104 conf->cache_key = prev->cache_key; |