Mercurial > hg > nginx-vendor-current
comparison 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 |
comparison
equal
deleted
inserted
replaced
619:c4e0de226b0b | 620:b4dcae568a2a |
---|---|
1025 fcn->count, fcn->exists, | 1025 fcn->count, fcn->exists, |
1026 fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]); | 1026 fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]); |
1027 | 1027 |
1028 if (fcn->count == 0) { | 1028 if (fcn->count == 0) { |
1029 ngx_http_file_cache_delete(cache, q, name); | 1029 ngx_http_file_cache_delete(cache, q, name); |
1030 wait = 0; | |
1030 | 1031 |
1031 } else { | 1032 } else { |
1032 if (--tries) { | 1033 if (--tries) { |
1033 continue; | 1034 continue; |
1034 } | 1035 } |
1189 ngx_http_file_cache_manager(void *data) | 1190 ngx_http_file_cache_manager(void *data) |
1190 { | 1191 { |
1191 ngx_http_file_cache_t *cache = data; | 1192 ngx_http_file_cache_t *cache = data; |
1192 | 1193 |
1193 off_t size; | 1194 off_t size; |
1194 time_t next; | 1195 time_t next, wait; |
1195 | 1196 |
1196 next = ngx_http_file_cache_expire(cache); | 1197 next = ngx_http_file_cache_expire(cache); |
1197 | 1198 |
1198 cache->last = ngx_current_msec; | 1199 cache->last = ngx_current_msec; |
1199 cache->files = 0; | 1200 cache->files = 0; |
1210 | 1211 |
1211 if (size < cache->max_size) { | 1212 if (size < cache->max_size) { |
1212 return next; | 1213 return next; |
1213 } | 1214 } |
1214 | 1215 |
1215 next = ngx_http_file_cache_forced_expire(cache); | 1216 wait = ngx_http_file_cache_forced_expire(cache); |
1217 | |
1218 if (wait > 0) { | |
1219 return wait; | |
1220 } | |
1216 | 1221 |
1217 if (ngx_http_file_cache_manager_sleep(cache) != NGX_OK) { | 1222 if (ngx_http_file_cache_manager_sleep(cache) != NGX_OK) { |
1218 return next; | 1223 return next; |
1219 } | 1224 } |
1220 } | 1225 } |