Mercurial > hg > nginx
comparison src/http/ngx_http_cache.h @ 171:aff0e5d32af8
nginx-0.0.1-2003-11-03-20:33:31 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 03 Nov 2003 17:33:31 +0000 |
parents | c42be4185301 |
children | caa57ddf6d77 |
comparison
equal
deleted
inserted
replaced
170:c42be4185301 | 171:aff0e5d32af8 |
---|---|
8 | 8 |
9 typedef struct { | 9 typedef struct { |
10 time_t expires; | 10 time_t expires; |
11 time_t last_modified; | 11 time_t last_modified; |
12 off_t length; | 12 off_t length; |
13 | |
14 size_t size; | |
15 } ngx_http_cache_header_t; | 13 } ngx_http_cache_header_t; |
16 | 14 |
17 | 15 |
18 typedef struct { | 16 typedef struct { |
19 ssize_t type; | |
20 ngx_http_cache_header_t header; | 17 ngx_http_cache_header_t header; |
21 ssize_t key_len; | 18 size_t key_len; |
22 char key[0]; | 19 char key[0]; |
23 } ngx_http_bin_cache_t; | 20 } ngx_http_cache_file_t; |
24 | |
25 | |
26 typedef struct { | |
27 char type; | |
28 char space0; | |
29 char expires[8]; | |
30 char space1; | |
31 char last_modified[8]; | |
32 char space2; | |
33 char length[16]; | |
34 char space3; | |
35 char lf; | |
36 char key_len[0]; | |
37 } ngx_http_text_cache_t; | |
38 | 21 |
39 | 22 |
40 typedef struct { | 23 typedef struct { |
41 u_int32_t crc; | 24 u_int32_t crc; |
42 ngx_str_t key; | 25 ngx_str_t key; |
55 ngx_file_t file; | 38 ngx_file_t file; |
56 ngx_str_t key; | 39 ngx_str_t key; |
57 ngx_path_t *path; | 40 ngx_path_t *path; |
58 ngx_hunk_t *buf; | 41 ngx_hunk_t *buf; |
59 ngx_http_cache_header_t header; | 42 ngx_http_cache_header_t header; |
43 ssize_t header_size; | |
60 } ngx_http_cache_ctx_t; | 44 } ngx_http_cache_ctx_t; |
45 | |
46 | |
47 #define NGX_STALE 1 | |
61 | 48 |
62 | 49 |
63 int ngx_http_cache_get_file(ngx_http_request_t *r, ngx_http_cache_ctx_t *ctx); | 50 int ngx_http_cache_get_file(ngx_http_request_t *r, ngx_http_cache_ctx_t *ctx); |
64 int ngx_http_cache_update_file(ngx_http_request_t *r,ngx_http_cache_ctx_t *ctx, | 51 int ngx_http_cache_update_file(ngx_http_request_t *r,ngx_http_cache_ctx_t *ctx, |
65 ngx_str_t *temp_file); | 52 ngx_str_t *temp_file); |
66 | 53 |
67 | 54 |
68 | 55 |
69 | |
70 | |
71 #endif /* _NGX_HTTP_CACHE_H_INCLUDED_ */ | 56 #endif /* _NGX_HTTP_CACHE_H_INCLUDED_ */ |