comparison src/http/ngx_http_cache.c @ 175:e92c2c647c57

nginx-0.0.1-2003-11-05-20:03:41 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 05 Nov 2003 17:03:41 +0000
parents ea464a6c0581
children c0552e5ab567
comparison
equal deleted inserted replaced
174:ea464a6c0581 175:e92c2c647c57
24 24
25 MD5Init(&md5); 25 MD5Init(&md5);
26 MD5Update(&md5, (u_char *) ctx->key.data, ctx->key.len); 26 MD5Update(&md5, (u_char *) ctx->key.data, ctx->key.len);
27 MD5Final(ctx->md5, &md5); 27 MD5Final(ctx->md5, &md5);
28 28
29 ngx_print_md5( 29 ngx_md5_text(ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len,
30 ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len,
31 ctx->md5); 30 ctx->md5);
32 #if 0
33 MD5End(&md5,
34 ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len);
35 #endif
36 31
37 ngx_log_debug(r->connection->log, "URL: %s, md5: %s" _ ctx->key.data _ 32 ngx_log_debug(r->connection->log, "URL: %s, md5: %s" _ ctx->key.data _
38 ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len); 33 ctx->file.name.data + ctx->path->name.len + 1 + ctx->path->len);
39 34
40 ngx_create_hashed_filename(&ctx->file, ctx->path); 35 ngx_create_hashed_filename(&ctx->file, ctx->path);
88 } 83 }
89 84
90 ctx->buf->last += n; 85 ctx->buf->last += n;
91 86
92 if (ctx->expires < ngx_time()) { 87 if (ctx->expires < ngx_time()) {
88 ngx_log_debug(r->connection->log, "EXPIRED");
93 return NGX_HTTP_CACHE_STALE; 89 return NGX_HTTP_CACHE_STALE;
94 } 90 }
95 91
96 /* TODO: NGX_HTTP_CACHE_AGED */ 92 /* TODO: NGX_HTTP_CACHE_AGED */
97 93