Mercurial > hg > nginx-quic
comparison src/http/ngx_http_cache.h @ 199:a65b630b3a66
nginx-0.0.1-2003-11-28-11:40:40 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 28 Nov 2003 08:40:40 +0000 |
parents | 0b81c7a0b133 |
children | abeaebe0a33c |
comparison
equal
deleted
inserted
replaced
198:34995c5ec6c4 | 199:a65b630b3a66 |
---|---|
42 | 42 |
43 typedef struct { | 43 typedef struct { |
44 ngx_http_cache_t *elts; | 44 ngx_http_cache_t *elts; |
45 size_t hash; | 45 size_t hash; |
46 size_t nelts; | 46 size_t nelts; |
47 time_t life_time; | 47 time_t life; |
48 time_t check_time; | 48 time_t update; |
49 ngx_pool_t *pool; | 49 ngx_pool_t *pool; |
50 } ngx_http_cache_hash_t; | 50 } ngx_http_cache_hash_t; |
51 | 51 |
52 | 52 |
53 typedef struct { | 53 typedef struct { |
72 typedef struct { | 72 typedef struct { |
73 ngx_http_cache_hash_t *open_files; | 73 ngx_http_cache_hash_t *open_files; |
74 } ngx_http_cache_conf_t; | 74 } ngx_http_cache_conf_t; |
75 | 75 |
76 | 76 |
77 #define ngx_http_cache_unlock(ch, ce) \ | |
78 ngx_mutex_lock(&ch->mutex); \ | |
79 ce->refs--; \ | |
80 ngx_mutex_unlock(&ch->mutex); | |
81 | |
82 | |
83 | |
77 #define NGX_HTTP_CACHE_STALE 1 | 84 #define NGX_HTTP_CACHE_STALE 1 |
78 #define NGX_HTTP_CACHE_AGED 2 | 85 #define NGX_HTTP_CACHE_AGED 2 |
79 #define NGX_HTTP_CACHE_THE_SAME 3 | 86 #define NGX_HTTP_CACHE_THE_SAME 3 |
80 | 87 |
81 | 88 |
91 ngx_log_t *log); | 98 ngx_log_t *log); |
92 | 99 |
93 int ngx_garbage_collector_http_cache_handler(ngx_gc_t *gc, ngx_str_t *name, | 100 int ngx_garbage_collector_http_cache_handler(ngx_gc_t *gc, ngx_str_t *name, |
94 ngx_dir_t *dir); | 101 ngx_dir_t *dir); |
95 | 102 |
103 char *ngx_http_set_cache_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | |
104 | |
105 | |
96 extern ngx_module_t ngx_http_cache_module; | 106 extern ngx_module_t ngx_http_cache_module; |
97 | 107 |
98 | 108 |
99 | 109 |
100 #endif /* _NGX_HTTP_CACHE_H_INCLUDED_ */ | 110 #endif /* _NGX_HTTP_CACHE_H_INCLUDED_ */ |