aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2015-02-02 19:38:35 +0300
committerRoman Arutyunyan <arut@nginx.com>2015-02-02 19:38:35 +0300
commitf8fecbc94d204c4ce1a86556d2642af00146995e (patch)
treea8e9046ec9b0f81790e58568523e5006ad9d65d8 /src/http/ngx_http_upstream.c
parent54e14a387fe0b18dc3e607effef26603a32cacf5 (diff)
downloadnginx-f8fecbc94d204c4ce1a86556d2642af00146995e.tar.gz
nginx-f8fecbc94d204c4ce1a86556d2642af00146995e.zip
Cache: added temp_path to file cache.
If use_temp_path is set to off, a subdirectory "temp" is created in the cache directory. It's used instead of proxy_temp_path and friends for caching upstream response.
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 0eb38ff2e..a41d5b377 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2688,10 +2688,8 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u)
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;
+ if (r->cache && r->cache->file_cache->temp_path) {
+ p->temp_file->path = r->cache->file_cache->temp_path;
}
#endif