fix r3708 and r3695: valid_sec is set only for caching error status codes

This commit is contained in:
Igor Sysoev 2010-07-27 19:11:17 +00:00
parent 9b63f57c7c
commit 74b9ebd872
1 changed files with 1 additions and 1 deletions

View File

@ -932,7 +932,7 @@ ngx_http_file_cache_free(ngx_http_request_t *r, ngx_temp_file_t *tf)
fcn->valid_msec = c->valid_msec;
fcn->error = c->error;
} else if (fcn->valid_sec == 0 && fcn->count == 0) {
} else if (!fcn->exists && fcn->count == 0) {
ngx_queue_remove(&fcn->queue);
ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node);
ngx_slab_free_locked(cache->shpool, fcn);