mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 20:53:30 +08:00
count cache key node usage for cached error statuses
This commit is contained in:
parent
09ce1e2d89
commit
1cd46b88a4
@ -519,6 +519,9 @@ ngx_http_file_cache_exists(ngx_http_file_cache_t *cache, ngx_http_cache_t *c)
|
|||||||
if (fcn) {
|
if (fcn) {
|
||||||
ngx_queue_remove(&fcn->queue);
|
ngx_queue_remove(&fcn->queue);
|
||||||
|
|
||||||
|
fcn->uses++;
|
||||||
|
fcn->count++;
|
||||||
|
|
||||||
if (fcn->error) {
|
if (fcn->error) {
|
||||||
|
|
||||||
if (fcn->valid_sec < ngx_time()) {
|
if (fcn->valid_sec < ngx_time()) {
|
||||||
@ -530,9 +533,6 @@ ngx_http_file_cache_exists(ngx_http_file_cache_t *cache, ngx_http_cache_t *c)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
fcn->uses++;
|
|
||||||
fcn->count++;
|
|
||||||
|
|
||||||
if (fcn->exists) {
|
if (fcn->exists) {
|
||||||
|
|
||||||
c->exists = fcn->exists;
|
c->exists = fcn->exists;
|
||||||
@ -581,12 +581,13 @@ ngx_http_file_cache_exists(ngx_http_file_cache_t *cache, ngx_http_cache_t *c)
|
|||||||
|
|
||||||
ngx_rbtree_insert(&cache->sh->rbtree, &fcn->node);
|
ngx_rbtree_insert(&cache->sh->rbtree, &fcn->node);
|
||||||
|
|
||||||
|
fcn->uses = 1;
|
||||||
|
fcn->count = 1;
|
||||||
|
|
||||||
renew:
|
renew:
|
||||||
|
|
||||||
rc = NGX_DECLINED;
|
rc = NGX_DECLINED;
|
||||||
|
|
||||||
fcn->uses = 1;
|
|
||||||
fcn->count = 1;
|
|
||||||
fcn->valid_msec = 0;
|
fcn->valid_msec = 0;
|
||||||
fcn->error = 0;
|
fcn->error = 0;
|
||||||
fcn->exists = 0;
|
fcn->exists = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user