Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 5968:99639bfdfa2a
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 02 Feb 2015 19:38:35 +0300 |
parents | 0a198a517eaf |
children | 26c127bab5ef |
comparison
equal
deleted
inserted
replaced
5967:863d9de1e62b | 5968:99639bfdfa2a |
---|---|
2686 | 2686 |
2687 if (p->cacheable) { | 2687 if (p->cacheable) { |
2688 p->temp_file->persistent = 1; | 2688 p->temp_file->persistent = 1; |
2689 | 2689 |
2690 #if (NGX_HTTP_CACHE) | 2690 #if (NGX_HTTP_CACHE) |
2691 if (r->cache && !r->cache->file_cache->use_temp_path) { | 2691 if (r->cache && r->cache->file_cache->temp_path) { |
2692 p->temp_file->file.name = r->cache->file.name; | 2692 p->temp_file->path = r->cache->file_cache->temp_path; |
2693 p->temp_file->path = r->cache->file_cache->path; | |
2694 p->temp_file->prefix = 1; | |
2695 } | 2693 } |
2696 #endif | 2694 #endif |
2697 | 2695 |
2698 } else { | 2696 } else { |
2699 p->temp_file->log_level = NGX_LOG_WARN; | 2697 p->temp_file->log_level = NGX_LOG_WARN; |