add warnings for proxy_no_cache and fastcgi_no_cache

This commit is contained in:
Igor Sysoev 2010-07-19 09:55:43 +00:00
parent f7d659aa52
commit 47f5f947bc
2 changed files with 12 additions and 0 deletions

View 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);

View 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);