aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_file_cache.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2015-02-17 16:27:52 +0300
committerRuslan Ermilov <ru@nginx.com>2015-02-17 16:27:52 +0300
commita4ce770a89f12924a61a5cd2ee6a862648fe0203 (patch)
tree47200b5ca5201de5b19e42388883d1f7f80dc1d7 /src/http/ngx_http_file_cache.c
parent6337c1d185d4afef6045d51d0382a06c7e66d4f4 (diff)
downloadnginx-a4ce770a89f12924a61a5cd2ee6a862648fe0203.tar.gz
nginx-a4ce770a89f12924a61a5cd2ee6a862648fe0203.zip
Cache: reduced diffs to the plus version of nginx.
No functional changes.
Diffstat (limited to 'src/http/ngx_http_file_cache.c')
-rw-r--r--src/http/ngx_http_file_cache.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 00d4c0f5a..8d06fb9bf 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -258,7 +258,7 @@ ngx_int_t
ngx_http_file_cache_open(ngx_http_request_t *r)
{
ngx_int_t rc, rv;
- ngx_uint_t cold, test;
+ ngx_uint_t test;
ngx_http_cache_t *c;
ngx_pool_cleanup_t *cln;
ngx_open_file_info_t of;
@@ -300,8 +300,6 @@ ngx_http_file_cache_open(ngx_http_request_t *r)
return NGX_HTTP_CACHE_SCARCE;
}
- cold = cache->sh->cold;
-
if (rc == NGX_OK) {
if (c->error) {
@@ -314,18 +312,18 @@ ngx_http_file_cache_open(ngx_http_request_t *r)
} else { /* rc == NGX_DECLINED */
+ test = cache->sh->cold ? 1 : 0;
+
if (c->min_uses > 1) {
- if (!cold) {
+ if (!test) {
return NGX_HTTP_CACHE_SCARCE;
}
- test = 1;
rv = NGX_HTTP_CACHE_SCARCE;
} else {
c->temp_file = 1;
- test = cold ? 1 : 0;
rv = NGX_DECLINED;
}
}