summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_file_cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 0c2b9e2d9..806364871 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -895,8 +895,9 @@ ngx_http_file_cache_cleaner(void *data)
now = ngx_time();
- if (now >= cache->next_clean_time) {
-
+ if (now >= cache->next_clean_time
+ && now >= cache->created + cache->inactive)
+ {
ngx_log_error(NGX_LOG_NOTICE, ngx_cycle->log, 0,
"clean unused cache files");