If cache was bypassed with proxy_cache_bypass, cache-controlling headers
(Cache-Control, Expires) wasn't considered and response was cached even
if it was actually non-cacheable.
Patch by John Ferlito.
return NGX_DECLINED;
}
+ u->cacheable = 1;
+
switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) {
case NGX_ERROR:
break;
}
- u->cacheable = 1;
-
c = r->cache;
c->min_uses = u->conf->cache_min_uses;
ngx_http_upstream_finalize_request(r, u, 0);
return;
}
-
- u->cacheable = 1;
}
break;