use ngx_http_test_predicates(), ngx_http_set_predicate_slot() delete ngx_http_cache(), ngx_http_no_cache_set_slot()
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 16d2bf8..81a3a01 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -332,7 +332,7 @@ { 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_set_predicate_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_fastcgi_loc_conf_t, upstream.no_cache), NULL },
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index fcae88e..c1ae681 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c
@@ -341,7 +341,7 @@ { ngx_string("proxy_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_set_predicate_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_proxy_loc_conf_t, upstream.no_cache), NULL },
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c index c6d848e..11d3610 100644 --- a/src/http/modules/ngx_http_scgi_module.c +++ b/src/http/modules/ngx_http_scgi_module.c
@@ -198,7 +198,7 @@ { ngx_string("scgi_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_set_predicate_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_scgi_loc_conf_t, upstream.no_cache), NULL },
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c index 466d34b..d46c8f3 100644 --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -225,7 +225,7 @@ { ngx_string("uwsgi_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_set_predicate_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_uwsgi_loc_conf_t, upstream.no_cache), NULL },
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h index 8f00329..ad5f135 100644 --- a/src/http/ngx_http_cache.h +++ b/src/http/ngx_http_cache.h
@@ -134,10 +134,6 @@ char *ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); -ngx_int_t ngx_http_cache(ngx_http_request_t *r, ngx_array_t *no_cache); -char *ngx_http_no_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, - void *conf); - extern ngx_str_t ngx_http_cache_status[];
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 44b8b94..ede6d2a 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c
@@ -633,11 +633,9 @@ if (c == NULL) { - if (u->conf->no_cache) { - rc = ngx_http_cache(r, u->conf->no_cache); - if (rc != NGX_OK) { - return rc; - } + rc = ngx_http_test_predicates(r, u->conf->no_cache); + if (rc != NGX_OK) { + return rc; } if (!(r->method & u->conf->cache_methods)) {