comparison src/core/ngx_open_file_cache.h @ 358:9121a0a91f47 NGINX_0_6_23

nginx 0.6.23 *) Change: the "off" parameter in the "ssl_session_cache" directive; now this is default parameter. *) Change: the "open_file_cache_retest" directive was renamed to the "open_file_cache_valid". *) Feature: the "open_file_cache_min_uses" directive. *) Feature: the ngx_http_gzip_static_module. *) Feature: the "gzip_disable" directive. *) Feature: the "memcached_pass" directive may be used inside the "if" block. *) Bugfix: a segmentation fault occurred in worker process, if the "memcached_pass" and "if" directives were used in the same location. *) Bugfix: if a "satisfy_any on" directive was used and not all access and auth modules directives were set, then other given access and auth directives were not tested; *) Bugfix: regex parameters in a "valid_referers" directive were not inherited from previous level. *) Bugfix: a "post_action" directive did run if a request was completed with 499 status code. *) Bugfix: optimization of 16K buffer usage in a SSL connection. Thanks to Ben Maurer. *) Bugfix: the STARTTLS in SMTP mode did not work. Thanks to Oleg Motienko. *) Bugfix: in HTTPS mode requests might fail with the "bad write retry" error; bug appeared in 0.5.13.
author Igor Sysoev <http://sysoev.ru>
date Thu, 27 Dec 2007 00:00:00 +0300
parents 3a91bfeffaba
children
comparison
equal deleted inserted replaced
357:16d557a75356 358:9121a0a91f47
17 ngx_file_uniq_t uniq; 17 ngx_file_uniq_t uniq;
18 time_t mtime; 18 time_t mtime;
19 off_t size; 19 off_t size;
20 ngx_err_t err; 20 ngx_err_t err;
21 21
22 time_t retest; 22 time_t valid;
23
24 ngx_uint_t min_uses;
23 25
24 unsigned test_dir:1; 26 unsigned test_dir:1;
25 unsigned errors:1; 27 unsigned errors:1;
26 unsigned events:1; 28 unsigned events:1;
27 29
34 36
35 typedef struct ngx_cached_open_file_s ngx_cached_open_file_t; 37 typedef struct ngx_cached_open_file_s ngx_cached_open_file_t;
36 38
37 struct ngx_cached_open_file_s { 39 struct ngx_cached_open_file_s {
38 ngx_rbtree_node_t node; 40 ngx_rbtree_node_t node;
39 ngx_cached_open_file_t *prev; 41 ngx_queue_t queue;
40 ngx_cached_open_file_t *next;
41 42
42 u_char *name; 43 u_char *name;
43 time_t created; 44 time_t created;
44 time_t accessed; 45 time_t accessed;
45 46
47 ngx_file_uniq_t uniq; 48 ngx_file_uniq_t uniq;
48 time_t mtime; 49 time_t mtime;
49 off_t size; 50 off_t size;
50 ngx_err_t err; 51 ngx_err_t err;
51 52
53 uint32_t uses;
54
52 unsigned count:24; 55 unsigned count:24;
53 unsigned close:1; 56 unsigned close:1;
57 unsigned use_event:1;
54 58
55 unsigned is_dir:1; 59 unsigned is_dir:1;
56 unsigned is_file:1; 60 unsigned is_file:1;
57 unsigned is_link:1; 61 unsigned is_link:1;
58 unsigned is_exec:1; 62 unsigned is_exec:1;
61 }; 65 };
62 66
63 67
64 typedef struct { 68 typedef struct {
65 ngx_rbtree_t rbtree; 69 ngx_rbtree_t rbtree;
66 ngx_cached_open_file_t list_head; 70 ngx_rbtree_node_t sentinel;
67 ngx_cached_open_file_t list_tail; 71 ngx_queue_t expire_queue;
68 72
69 ngx_uint_t current; 73 ngx_uint_t current;
70 ngx_uint_t max; 74 ngx_uint_t max;
71 time_t inactive; 75 time_t inactive;
72 } ngx_open_file_cache_t; 76 } ngx_open_file_cache_t;
73 77
74 78
75 typedef struct { 79 typedef struct {
76 ngx_open_file_cache_t *cache; 80 ngx_open_file_cache_t *cache;
77 ngx_cached_open_file_t *file; 81 ngx_cached_open_file_t *file;
82 ngx_uint_t min_uses;
78 ngx_log_t *log; 83 ngx_log_t *log;
79 } ngx_open_file_cache_cleanup_t; 84 } ngx_open_file_cache_cleanup_t;
80 85
81 86
82 typedef struct { 87 typedef struct {