comparison src/http/ngx_http_cache.h @ 3711:ce6ba077c270

several changes in cache cleanup handling: *) now ngx_http_file_cache_cleanup() uses ngx_http_file_cache_free() *) ngx_http_file_cache_free() interface has been changed to accept r->cache ngx_http_file_cache_cleanup() must use r->cache, but not r, because there can be several r->cache's during request processing, r->cache may be NULL at request finalising, etc. *) test if updating request does not complete correctly
author Igor Sysoev <igor@sysoev.ru>
date Wed, 28 Jul 2010 15:49:34 +0000
parents b0a0686a85bb
children 76e3a93821b1
comparison
equal deleted inserted replaced
3710:5f63b6ab4d4b 3711:ce6ba077c270
76 76
77 ngx_http_file_cache_t *file_cache; 77 ngx_http_file_cache_t *file_cache;
78 ngx_http_file_cache_node_t *node; 78 ngx_http_file_cache_node_t *node;
79 79
80 unsigned updated:1; 80 unsigned updated:1;
81 unsigned updating:1;
81 unsigned exists:1; 82 unsigned exists:1;
82 unsigned temp_file:1; 83 unsigned temp_file:1;
83 }; 84 };
84 85
85 86
127 void ngx_http_file_cache_create_key(ngx_http_request_t *r); 128 void ngx_http_file_cache_create_key(ngx_http_request_t *r);
128 ngx_int_t ngx_http_file_cache_open(ngx_http_request_t *r); 129 ngx_int_t ngx_http_file_cache_open(ngx_http_request_t *r);
129 void ngx_http_file_cache_set_header(ngx_http_request_t *r, u_char *buf); 130 void ngx_http_file_cache_set_header(ngx_http_request_t *r, u_char *buf);
130 void ngx_http_file_cache_update(ngx_http_request_t *r, ngx_temp_file_t *tf); 131 void ngx_http_file_cache_update(ngx_http_request_t *r, ngx_temp_file_t *tf);
131 ngx_int_t ngx_http_cache_send(ngx_http_request_t *); 132 ngx_int_t ngx_http_cache_send(ngx_http_request_t *);
132 void ngx_http_file_cache_free(ngx_http_request_t *r, ngx_temp_file_t *tf); 133 void ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf);
133 time_t ngx_http_file_cache_valid(ngx_array_t *cache_valid, ngx_uint_t status); 134 time_t ngx_http_file_cache_valid(ngx_array_t *cache_valid, ngx_uint_t status);
134 135
135 char *ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, 136 char *ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
136 void *conf); 137 void *conf);
137 char *ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, 138 char *ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,