From ef1f33b0db5a69afeb4272668089ed5f760aea68 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 22 Apr 2011 10:06:43 +0000 Subject: Use more precise stat.st_blocks to account cache size on Unix instead of file length rounded to a file system block size. There is no similar way on Windows, so rounding to a cache->bsize is kept. --- src/http/ngx_http_cache.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/http/ngx_http_cache.h') diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h index b511a0b91..3cf113f4a 100644 --- a/src/http/ngx_http_cache.h +++ b/src/http/ngx_http_cache.h @@ -50,7 +50,7 @@ typedef struct { time_t expire; time_t valid_sec; size_t body_start; - off_t length; + off_t fs_size; } ngx_http_file_cache_node_t; @@ -68,6 +68,7 @@ struct ngx_http_cache_s { size_t header_start; size_t body_start; off_t length; + off_t fs_size; ngx_uint_t min_uses; ngx_uint_t error; -- cgit