diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-05-24 11:01:05 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-24 11:01:05 +0000 |
commit | 9b2763a245e51032734089672a8a74611a288fae (patch) | |
tree | 7ee770dbac28d73819b6f3374e90f060c7828016 /src/http/modules/ngx_http_fastcgi_module.c | |
parent | fbb262533f8fec6dd2e05f9954225f3077391291 (diff) | |
download | nginx-9b2763a245e51032734089672a8a74611a288fae.tar.gz nginx-9b2763a245e51032734089672a8a74611a288fae.zip |
proxy_no_cache and fastcgi_no_cache
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r-- | src/http/modules/ngx_http_fastcgi_module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 5c8da37d8..18df9f6d6 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -336,6 +336,13 @@ static ngx_command_t ngx_http_fastcgi_commands[] = { 0, &ngx_http_fastcgi_module }, + { ngx_string("fastcgi_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_LOC_CONF_OFFSET, + offsetof(ngx_http_fastcgi_loc_conf_t, upstream.no_cache), + NULL }, + { ngx_string("fastcgi_cache_valid"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, ngx_http_file_cache_valid_set_slot, @@ -1923,6 +1930,7 @@ ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf) #if (NGX_HTTP_CACHE) conf->upstream.cache = NGX_CONF_UNSET_PTR; conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; + conf->upstream.no_cache = NGX_CONF_UNSET_PTR; conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; #endif @@ -2144,6 +2152,9 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; + ngx_conf_merge_ptr_value(conf->upstream.no_cache, + prev->upstream.no_cache, NULL); + ngx_conf_merge_ptr_value(conf->upstream.cache_valid, prev->upstream.cache_valid, NULL); |