diff src/http/ngx_http_cache.h @ 7670:ccb5ff87ab3e

Cache: introduced min_free cache clearing. Clearing cache based on free space left on a file system is expected to allow better disk utilization in some cases, notably when disk space might be also used for something other than nginx cache (including nginx own temporary files) and while loading cache (when cache size might be inaccurate for a while, effectively disabling max_size cache clearing). Based on a patch by Adam Bambuch.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 22 Jun 2020 18:03:00 +0300
parents 609daeb3b48b
children 847fd35f94de
line wrap: on
line diff
--- a/src/http/ngx_http_cache.h
+++ b/src/http/ngx_http_cache.h
@@ -160,6 +160,7 @@ struct ngx_http_file_cache_s {
 
     ngx_path_t                      *path;
 
+    off_t                            min_free;
     off_t                            max_size;
     size_t                           bsize;