# HG changeset patch # User Igor Sysoev # Date 1279106145 0 # Node ID 045ea40cbfe883be50dedb933297a57dc8d6626e # Parent 55f95e91daed7a230f6c5565454851627fdc77ac use ngx_http_test_predicates(), ngx_http_set_predicate_slot() delete ngx_http_cache(), ngx_http_no_cache_set_slot() diff -r 55f95e91daed -r 045ea40cbfe8 src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c Wed Jul 14 11:13:59 2010 +0000 +++ b/src/http/modules/ngx_http_fastcgi_module.c Wed Jul 14 11:15:45 2010 +0000 @@ -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 -r 55f95e91daed -r 045ea40cbfe8 src/http/modules/ngx_http_proxy_module.c --- a/src/http/modules/ngx_http_proxy_module.c Wed Jul 14 11:13:59 2010 +0000 +++ b/src/http/modules/ngx_http_proxy_module.c Wed Jul 14 11:15:45 2010 +0000 @@ -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 -r 55f95e91daed -r 045ea40cbfe8 src/http/modules/ngx_http_scgi_module.c --- a/src/http/modules/ngx_http_scgi_module.c Wed Jul 14 11:13:59 2010 +0000 +++ b/src/http/modules/ngx_http_scgi_module.c Wed Jul 14 11:15:45 2010 +0000 @@ -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 -r 55f95e91daed -r 045ea40cbfe8 src/http/modules/ngx_http_uwsgi_module.c --- a/src/http/modules/ngx_http_uwsgi_module.c Wed Jul 14 11:13:59 2010 +0000 +++ b/src/http/modules/ngx_http_uwsgi_module.c Wed Jul 14 11:15:45 2010 +0000 @@ -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 -r 55f95e91daed -r 045ea40cbfe8 src/http/ngx_http_cache.h --- a/src/http/ngx_http_cache.h Wed Jul 14 11:13:59 2010 +0000 +++ b/src/http/ngx_http_cache.h Wed Jul 14 11:15:45 2010 +0000 @@ -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 -r 55f95e91daed -r 045ea40cbfe8 src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c Wed Jul 14 11:13:59 2010 +0000 +++ b/src/http/ngx_http_upstream.c Wed Jul 14 11:15:45 2010 +0000 @@ -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)) {