]> git.kaiwu.me - nginx.git/commitdiff
add warnings for proxy_no_cache and fastcgi_no_cache
authorIgor Sysoev <igor@sysoev.ru>
Mon, 19 Jul 2010 09:55:43 +0000 (09:55 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 19 Jul 2010 09:55:43 +0000 (09:55 +0000)
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_proxy_module.c

index 192de79f33c7d8ec009a78c4dba71aafc2558f81..4731f784f3c7e7a817967f04709109bdfe5e6d22 100644 (file)
@@ -2222,6 +2222,12 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_ptr_value(conf->upstream.no_cache,
                              prev->upstream.no_cache, NULL);
 
+    if (conf->upstream.no_cache && conf->upstream.cache_bypass == NULL) {
+        ngx_log_error(NGX_LOG_WARN, cf->log, 0,
+             "\"fastcgi_no_cache\" functionality has been changed in 0.8.46, "
+             "now it should be used together with \"fastcgi_cache_bypass\"");
+    }
+
     ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
                              prev->upstream.cache_valid, NULL);
 
index 2fff21c98a6e538dde92202135070c778e0e125e..b067d60c668689aa269b490bf6c2e85413e57769 100644 (file)
@@ -1916,6 +1916,12 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_ptr_value(conf->upstream.no_cache,
                              prev->upstream.no_cache, NULL);
 
+    if (conf->upstream.no_cache && conf->upstream.cache_bypass == NULL) {
+        ngx_log_error(NGX_LOG_WARN, cf->log, 0,
+             "\"proxy_no_cache\" functionality has been changed in 0.8.46, "
+             "now it should be used together with \"proxy_cache_bypass\"");
+    }
+
     ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
                              prev->upstream.cache_valid, NULL);