Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.c @ 2600:df5e99f6464b
do not clean cache if memory cache keys zone is cold
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 24 Mar 2009 12:25:43 +0000 |
parents | 3a8a53c0c42f |
children | f9bd7999eb08 |
comparison
equal
deleted
inserted
replaced
2599:57b65bcc8da6 | 2600:df5e99f6464b |
---|---|
893 time_t now, next; | 893 time_t now, next; |
894 ngx_tree_ctx_t tree; | 894 ngx_tree_ctx_t tree; |
895 | 895 |
896 now = ngx_time(); | 896 now = ngx_time(); |
897 | 897 |
898 if (now >= cache->next_clean_time) { | 898 if (now >= cache->next_clean_time |
899 | 899 && now >= cache->created + cache->inactive) |
900 { | |
900 ngx_log_error(NGX_LOG_NOTICE, ngx_cycle->log, 0, | 901 ngx_log_error(NGX_LOG_NOTICE, ngx_cycle->log, 0, |
901 "clean unused cache files"); | 902 "clean unused cache files"); |
902 | 903 |
903 tree.init_handler = NULL; | 904 tree.init_handler = NULL; |
904 tree.file_handler = ngx_http_file_cache_clean_file; | 905 tree.file_handler = ngx_http_file_cache_clean_file; |