comparison src/http/modules/proxy/ngx_http_proxy_cache.c @ 193:dd66383796a5

nginx-0.0.1-2003-11-20-20:36:43 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 20 Nov 2003 17:36:43 +0000
parents 02a715e85df1
children 8dee38ea9117
comparison
equal deleted inserted replaced
192:31824be1fc66 193:dd66383796a5
249 { 249 {
250 int rc, ft_type; 250 int rc, ft_type;
251 251
252 rc = ngx_http_busy_lock_cachable(p->lcf->busy_lock, &p->busy_lock, 252 rc = ngx_http_busy_lock_cachable(p->lcf->busy_lock, &p->busy_lock,
253 p->try_busy_lock); 253 p->try_busy_lock);
254
255 ngx_log_debug(p->request->connection->log, "LOCK CACHABLE: %d" _ rc);
254 256
255 if (rc == NGX_OK) { 257 if (rc == NGX_OK) {
256 if (p->try_busy_lock) { 258 if (p->try_busy_lock) {
257 p->busy_locked = 1; 259 p->busy_locked = 1;
258 p->header_in->pos = p->header_in->start + p->cache->ctx.header_size; 260 p->header_in->pos = p->header_in->start + p->cache->ctx.header_size;
342 344
343 *ctx = p->cache->ctx; 345 *ctx = p->cache->ctx;
344 346
345 rc = ngx_http_cache_open_file(ctx, ngx_file_uniq(&p->cache->ctx.file.info)); 347 rc = ngx_http_cache_open_file(ctx, ngx_file_uniq(&p->cache->ctx.file.info));
346 348
347 if (rc == NGX_HTTP_CACHE_THE_SAME) { 349 if (rc == NGX_DECLINED || rc == NGX_HTTP_CACHE_THE_SAME) {
348 p->try_busy_lock = 1; 350 p->try_busy_lock = 1;
349 p->busy_lock.time = 0; 351 p->busy_lock.time = 0;
350 ngx_http_proxy_cache_busy_lock(p); 352 ngx_http_proxy_cache_busy_lock(p);
351 return; 353 return;
352 } 354 }