comparison src/os/unix/ngx_process_cycle.c @ 6727:ca709bca4b77

Cache: cache manager limits. The new parameters "manager_files", "manager_sleep" and "manager_threshold" were added to proxy_cache_path and friends. Note that ngx_path_manager_pt was changed to return ngx_msec_t instead of time_t (API change).
author Dmitry Volyntsev <xeioex@nginx.com>
date Wed, 05 Oct 2016 14:22:30 +0300
parents 7d4e33092e2a
children 3069dd358ba2
comparison
equal deleted inserted replaced
6726:631753428ecb 6727:ca709bca4b77
1146 1146
1147 1147
1148 static void 1148 static void
1149 ngx_cache_manager_process_handler(ngx_event_t *ev) 1149 ngx_cache_manager_process_handler(ngx_event_t *ev)
1150 { 1150 {
1151 time_t next, n;
1152 ngx_uint_t i; 1151 ngx_uint_t i;
1152 ngx_msec_t next, n;
1153 ngx_path_t **path; 1153 ngx_path_t **path;
1154 1154
1155 next = 60 * 60; 1155 next = 60 * 60 * 1000;
1156 1156
1157 path = ngx_cycle->paths.elts; 1157 path = ngx_cycle->paths.elts;
1158 for (i = 0; i < ngx_cycle->paths.nelts; i++) { 1158 for (i = 0; i < ngx_cycle->paths.nelts; i++) {
1159 1159
1160 if (path[i]->manager) { 1160 if (path[i]->manager) {
1168 1168
1169 if (next == 0) { 1169 if (next == 0) {
1170 next = 1; 1170 next = 1;
1171 } 1171 }
1172 1172
1173 ngx_add_timer(ev, next * 1000); 1173 ngx_add_timer(ev, next);
1174 } 1174 }
1175 1175
1176 1176
1177 static void 1177 static void
1178 ngx_cache_loader_process_handler(ngx_event_t *ev) 1178 ngx_cache_loader_process_handler(ngx_event_t *ev)