summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-03-24 12:25:43 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-03-24 12:25:43 +0000
commit7e4d11bb44a97cd6a51909221c4e4c03db4030cb (patch)
treee95266cb62570a079a551dfcdf43dd8da2a9e323 /src
parent0f825e64404431962bc68b3ca0b6c52305d0ac27 (diff)
downloadnginx-7e4d11bb44a97cd6a51909221c4e4c03db4030cb.tar.gz
nginx-7e4d11bb44a97cd6a51909221c4e4c03db4030cb.tar.bz2
do not clean cache if memory cache keys zone is cold
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");