Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.c @ 257:70e1c7d2b83d
nginx-0.0.2-2004-02-11-20:08:49 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Feb 2004 17:08:49 +0000 |
parents | 74994aeef848 |
children | 6468241715e6 |
comparison
equal
deleted
inserted
replaced
256:8e39cab6abd5 | 257:70e1c7d2b83d |
---|---|
34 MD5Final(ctx->md5, &md5); | 34 MD5Final(ctx->md5, &md5); |
35 | 35 |
36 ngx_md5_text(ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len, | 36 ngx_md5_text(ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len, |
37 ctx->md5); | 37 ctx->md5); |
38 | 38 |
39 ngx_log_debug(r->connection->log, "URL: %s, md5: %s" _ ctx->key.data _ | 39 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
40 ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len); | 40 "file cache uri: %s, md5: %s", ctx->key.data, |
41 ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len); | |
41 | 42 |
42 ngx_create_hashed_filename(&ctx->file, ctx->path); | 43 ngx_create_hashed_filename(&ctx->file, ctx->path); |
43 | 44 |
44 ngx_log_debug(r->connection->log, "FILE: %s" _ ctx->file.name.data); | 45 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
46 "file cache name: %s", ctx->file.name.data); | |
45 | 47 |
46 /* TODO: look open files cache */ | 48 /* TODO: look open files cache */ |
47 | 49 |
48 return ngx_http_cache_open_file(ctx, 0); | 50 return ngx_http_cache_open_file(ctx, 0); |
49 } | 51 } |
127 } | 129 } |
128 | 130 |
129 ctx->buf->last += n; | 131 ctx->buf->last += n; |
130 | 132 |
131 if (ctx->expires < ngx_time()) { | 133 if (ctx->expires < ngx_time()) { |
132 ngx_log_debug(ctx->log, "EXPIRED"); | 134 |
135 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, ctx->log, 0, | |
136 "http file cache expired"); | |
137 | |
133 return NGX_HTTP_CACHE_STALE; | 138 return NGX_HTTP_CACHE_STALE; |
134 } | 139 } |
135 | 140 |
136 /* TODO: NGX_HTTP_CACHE_AGED */ | 141 /* TODO: NGX_HTTP_CACHE_AGED */ |
137 | 142 |