comparison src/http/ngx_http_file_cache.c @ 3710:5f63b6ab4d4b

fix r3708 and r3695: valid_sec is set only for caching error status codes
author Igor Sysoev <igor@sysoev.ru>
date Tue, 27 Jul 2010 19:11:17 +0000
parents b9a64a91fe76
children ce6ba077c270
comparison
equal deleted inserted replaced
3709:64777690c697 3710:5f63b6ab4d4b
930 if (c->error) { 930 if (c->error) {
931 fcn->valid_sec = c->valid_sec; 931 fcn->valid_sec = c->valid_sec;
932 fcn->valid_msec = c->valid_msec; 932 fcn->valid_msec = c->valid_msec;
933 fcn->error = c->error; 933 fcn->error = c->error;
934 934
935 } else if (fcn->valid_sec == 0 && fcn->count == 0) { 935 } else if (!fcn->exists && fcn->count == 0) {
936 ngx_queue_remove(&fcn->queue); 936 ngx_queue_remove(&fcn->queue);
937 ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node); 937 ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node);
938 ngx_slab_free_locked(cache->shpool, fcn); 938 ngx_slab_free_locked(cache->shpool, fcn);
939 c->node = NULL; 939 c->node = NULL;
940 } 940 }