Mercurial > hg > nginx
comparison src/http/ngx_http_cache.h @ 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 | e9effef98874 |
children | d698c300b9ff |
comparison
equal
deleted
inserted
replaced
5967:863d9de1e62b | 5968:99639bfdfa2a |
---|---|
140 struct ngx_http_file_cache_s { | 140 struct ngx_http_file_cache_s { |
141 ngx_http_file_cache_sh_t *sh; | 141 ngx_http_file_cache_sh_t *sh; |
142 ngx_slab_pool_t *shpool; | 142 ngx_slab_pool_t *shpool; |
143 | 143 |
144 ngx_path_t *path; | 144 ngx_path_t *path; |
145 ngx_path_t *temp_path; | |
145 | 146 |
146 off_t max_size; | 147 off_t max_size; |
147 size_t bsize; | 148 size_t bsize; |
148 | 149 |
149 time_t inactive; | 150 time_t inactive; |
153 ngx_msec_t last; | 154 ngx_msec_t last; |
154 ngx_msec_t loader_sleep; | 155 ngx_msec_t loader_sleep; |
155 ngx_msec_t loader_threshold; | 156 ngx_msec_t loader_threshold; |
156 | 157 |
157 ngx_shm_zone_t *shm_zone; | 158 ngx_shm_zone_t *shm_zone; |
158 | |
159 ngx_uint_t use_temp_path; | |
160 /* unsigned use_temp_path:1 */ | |
161 }; | 159 }; |
162 | 160 |
163 | 161 |
164 ngx_int_t ngx_http_file_cache_new(ngx_http_request_t *r); | 162 ngx_int_t ngx_http_file_cache_new(ngx_http_request_t *r); |
165 ngx_int_t ngx_http_file_cache_create(ngx_http_request_t *r); | 163 ngx_int_t ngx_http_file_cache_create(ngx_http_request_t *r); |