comparison src/http/ngx_http_file_cache.c @ 2926:80a314b63c56

delete useless r->cache->uses
author Igor Sysoev <igor@sysoev.ru>
date Sat, 06 Jun 2009 17:48:54 +0000
parents 8e3e31fd00a9
children 55ceaef03d34
comparison
equal deleted inserted replaced
2925:8e3e31fd00a9 2926:80a314b63c56
170 return NGX_ERROR; 170 return NGX_ERROR;
171 } 171 }
172 172
173 rc = ngx_http_file_cache_exists(cache, c); 173 rc = ngx_http_file_cache_exists(cache, c);
174 174
175 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 175 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
176 "http file cache exists: %i u:%ui e:%d", 176 "http file cache exists: %i e:%d", rc, c->exists);
177 rc, c->uses, c->exists);
178 177
179 if (rc == NGX_ERROR) { 178 if (rc == NGX_ERROR) {
180 return rc; 179 return rc;
181 } 180 }
182 181
329 } 328 }
330 329
331 now = ngx_time(); 330 now = ngx_time();
332 331
333 if (c->valid_sec < now) { 332 if (c->valid_sec < now) {
334
335 c->uses = c->min_uses;
336 333
337 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 334 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
338 "http file cache expired: %T %T", c->valid_sec, now); 335 "http file cache expired: %T %T", c->valid_sec, now);
339 336
340 return NGX_HTTP_CACHE_STALE; 337 return NGX_HTTP_CACHE_STALE;
438 fcn->expire = ngx_time() + cache->inactive; 435 fcn->expire = ngx_time() + cache->inactive;
439 436
440 ngx_queue_insert_head(&cache->sh->queue, &fcn->queue); 437 ngx_queue_insert_head(&cache->sh->queue, &fcn->queue);
441 438
442 c->uniq = fcn->uniq; 439 c->uniq = fcn->uniq;
443 c->uses = fcn->uses;
444 c->error = fcn->error; 440 c->error = fcn->error;
445 c->node = fcn; 441 c->node = fcn;
446 442
447 failed: 443 failed:
448 444