Mercurial > hg > nginx-quic
diff src/http/ngx_http_upstream.c @ 5960:e9effef98874
Upstream: use_temp_path parameter of proxy_cache_path and friends.
When set to "off", temporary files for cacheable responses will be stored
inside cache directory.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Fri, 26 Dec 2014 16:22:59 +0300 |
parents | f7584d7c0ccb |
children | 0a198a517eaf |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2677,6 +2677,14 @@ ngx_http_upstream_send_response(ngx_http if (p->cacheable) { p->temp_file->persistent = 1; +#if (NGX_HTTP_CACHE) + if (r->cache && !r->cache->file_cache->use_temp_path) { + p->temp_file->file.name = r->cache->file.name; + p->temp_file->path = r->cache->file_cache->path; + p->temp_file->prefix = 1; + } +#endif + } else { p->temp_file->log_level = NGX_LOG_WARN; p->temp_file->warn = "an upstream response is buffered "