comparison src/http/modules/ngx_http_index_handler.c @ 202:74994aeef848

nginx-0.0.1-2003-12-01-19:28:14 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Dec 2003 16:28:14 +0000
parents 267ea1d98683
children 70e1c7d2b83d
comparison
equal deleted inserted replaced
201:267ea1d98683 202:74994aeef848
130 &r->uri, &crc); 130 &r->uri, &crc);
131 131
132 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, 132 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
133 "http index cache get: " PTR_FMT, ctx->cache); 133 "http index cache get: " PTR_FMT, ctx->cache);
134 134
135 if (ctx->cache && ctx->cache->valid) { 135 if (ctx->cache && !ctx->cache->expired) {
136 136
137 ctx->cache->accessed = ngx_cached_time; 137 ctx->cache->accessed = ngx_cached_time;
138 138
139 ctx->redirect.len = ctx->cache->data.value.len; 139 ctx->redirect.len = ctx->cache->data.value.len;
140 ctx->redirect.data = ngx_palloc(r->pool, ctx->redirect.len + 1); 140 ctx->redirect.data = ngx_palloc(r->pool, ctx->redirect.len + 1);
264 if (ctx->cache) { 264 if (ctx->cache) {
265 ctx->cache->fd = NGX_INVALID_FILE; 265 ctx->cache->fd = NGX_INVALID_FILE;
266 ctx->cache->accessed = ngx_cached_time; 266 ctx->cache->accessed = ngx_cached_time;
267 ctx->cache->last_modified = 0; 267 ctx->cache->last_modified = 0;
268 ctx->cache->updated = ngx_cached_time; 268 ctx->cache->updated = ngx_cached_time;
269 ctx->cache->valid = 1;
270 ctx->cache->memory = 1; 269 ctx->cache->memory = 1;
271 ngx_http_cache_unlock(ilcf->index_cache, ctx->cache, log); 270 ngx_http_cache_unlock(ilcf->index_cache, ctx->cache, log);
272 } 271 }
273 } 272 }
274 273