aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_index_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_index_handler.c')
-rw-r--r--src/http/modules/ngx_http_index_handler.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c
index ee5efd2cb..edcf54a2d 100644
--- a/src/http/modules/ngx_http_index_handler.c
+++ b/src/http/modules/ngx_http_index_handler.c
@@ -132,7 +132,7 @@ int ngx_http_index_handler(ngx_http_request_t *r)
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
"http index cache get: " PTR_FMT, ctx->cache);
- if (ctx->cache && ctx->cache->valid) {
+ if (ctx->cache && !ctx->cache->expired) {
ctx->cache->accessed = ngx_cached_time;
@@ -266,7 +266,6 @@ int ngx_http_index_handler(ngx_http_request_t *r)
ctx->cache->accessed = ngx_cached_time;
ctx->cache->last_modified = 0;
ctx->cache->updated = ngx_cached_time;
- ctx->cache->valid = 1;
ctx->cache->memory = 1;
ngx_http_cache_unlock(ilcf->index_cache, ctx->cache, log);
}