summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/http/ngx_http_upstream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index eaf54812f..4226198ba 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -621,6 +621,13 @@ 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;
+ }
+ }
+
if (!(r->method & u->conf->cache_methods)) {
return NGX_DECLINED;
}