diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2016-11-03 17:10:29 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2016-11-03 17:10:29 +0300 |
| commit | f3093695b9e3069ef4c525cf24b5ddda8ae5f83a (patch) | |
| tree | 08012d22b81dc36e4d8f3262f62654b564ec40cb /src/http/ngx_http_cache.h | |
| parent | 5eac3bca41bcf4d75d0da2fe88e72516e889779d (diff) | |
| download | nginx-f3093695b9e3069ef4c525cf24b5ddda8ae5f83a.tar.gz nginx-f3093695b9e3069ef4c525cf24b5ddda8ae5f83a.tar.bz2 | |
Cache: prefix-based temporary files.
On Linux, the rename syscall can be slow due to a global file system lock,
acquired for the entire rename operation, unless both old and new files are
in the same directory. To address this temporary files are now created
in the same directory as the expected resulting cache file when using the
"use_temp_path=off" parameter.
This change mostly reverts 99639bfdfa2a and 3281de8142f5, restoring the
behaviour as of a9138c35120d (with minor changes).
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_cache.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h index 70342d0ed..4075f3dec 100644 --- a/src/http/ngx_http_cache.h +++ b/src/http/ngx_http_cache.h @@ -151,7 +151,6 @@ struct ngx_http_file_cache_s { ngx_slab_pool_t *shpool; ngx_path_t *path; - ngx_path_t *temp_path; off_t max_size; size_t bsize; @@ -171,6 +170,9 @@ struct ngx_http_file_cache_s { ngx_msec_t manager_threshold; ngx_shm_zone_t *shm_zone; + + ngx_uint_t use_temp_path; + /* unsigned use_temp_path:1 */ }; |
