]> git.kaiwu.me - nginx.git/commit
Cache: prefix-based temporary files.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 3 Nov 2016 14:10:29 +0000 (17:10 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 3 Nov 2016 14:10:29 +0000 (17:10 +0300)
commitf3093695b9e3069ef4c525cf24b5ddda8ae5f83a
tree08012d22b81dc36e4d8f3262f62654b564ec40cb
parent5eac3bca41bcf4d75d0da2fe88e72516e889779d
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).
src/core/ngx_file.c
src/http/ngx_http_cache.h
src/http/ngx_http_file_cache.c
src/http/ngx_http_upstream.c