aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-07-14 11:15:45 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-07-14 11:15:45 +0000
commitf3870c66df0c79b6da45b2a49d113d45456c04d5 (patch)
tree4655598f33abe951f3552acc34f6485906137aff /src
parent7fc29052e8e8e3c26b208813d0fbc3dd2090ca1d (diff)
downloadnginx-f3870c66df0c79b6da45b2a49d113d45456c04d5.tar.gz
nginx-f3870c66df0c79b6da45b2a49d113d45456c04d5.zip
use ngx_http_test_predicates(), ngx_http_set_predicate_slot()
delete ngx_http_cache(), ngx_http_no_cache_set_slot()
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c2
-rw-r--r--src/http/modules/ngx_http_proxy_module.c2
-rw-r--r--src/http/modules/ngx_http_scgi_module.c2
-rw-r--r--src/http/modules/ngx_http_uwsgi_module.c2
-rw-r--r--src/http/ngx_http_cache.h4
-rw-r--r--src/http/ngx_http_upstream.c8
6 files changed, 7 insertions, 13 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 16d2bf8a0..81a3a014c 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -332,7 +332,7 @@ static ngx_command_t ngx_http_fastcgi_commands[] = {
{ 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 fcae88e12..c1ae68191 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -341,7 +341,7 @@ static ngx_command_t ngx_http_proxy_commands[] = {
{ 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 c6d848e4b..11d3610a4 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -198,7 +198,7 @@ static ngx_command_t ngx_http_scgi_commands[] = {
{ 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 466d34be0..d46c8f371 100644
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -225,7 +225,7 @@ static ngx_command_t ngx_http_uwsgi_commands[] = {
{ 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 8f0032921..ad5f1356b 100644
--- a/src/http/ngx_http_cache.h
+++ b/src/http/ngx_http_cache.h
@@ -134,10 +134,6 @@ char *ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
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 44b8b947c..ede6d2ad5 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -633,11 +633,9 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
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)) {