diff src/http/ngx_http_cache.h @ 3899:e7cd13b7f759

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.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 22 Apr 2011 10:06:43 +0000
parents 76e3a93821b1
children d10bcb07d9d4 4919fb357a5d
line wrap: on
line diff
--- 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;