Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_file_cache.c @ 620:b4dcae568a2a NGINX_1_0_0
nginx 1.0.0
*) Bugfix: a cache manager might hog CPU after reload.
Thanks to Maxim Dounin.
*) Bugfix: an "image_filter crop" directive worked incorrectly coupled
with an "image_filter rotate 180" directive.
*) Bugfix: a "satisfy any" directive disabled custom 401 error page.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 12 Apr 2011 00:00:00 +0400 |
parents | 6c96fdd2dfc3 |
children | 8dc007eddbcf |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -1027,6 +1027,7 @@ ngx_http_file_cache_forced_expire(ngx_ht if (fcn->count == 0) { ngx_http_file_cache_delete(cache, q, name); + wait = 0; } else { if (--tries) { @@ -1191,7 +1192,7 @@ ngx_http_file_cache_manager(void *data) ngx_http_file_cache_t *cache = data; off_t size; - time_t next; + time_t next, wait; next = ngx_http_file_cache_expire(cache); @@ -1212,7 +1213,11 @@ ngx_http_file_cache_manager(void *data) return next; } - next = ngx_http_file_cache_forced_expire(cache); + wait = ngx_http_file_cache_forced_expire(cache); + + if (wait > 0) { + return wait; + } if (ngx_http_file_cache_manager_sleep(cache) != NGX_OK) { return next;