3 * Copyright (C) Igor Sysoev
7 #include <ngx_config.h>
11 #ifndef _NGX_OPEN_FILE_CACHE_H_INCLUDED_
12 #define _NGX_OPEN_FILE_CACHE_H_INCLUDED_
35 } ngx_open_file_info_t
;
38 typedef struct ngx_cached_open_file_s ngx_cached_open_file_t
;
40 struct ngx_cached_open_file_s
{
41 ngx_rbtree_node_t node
;
71 ngx_rbtree_node_t sentinel
;
72 ngx_queue_t expire_queue
;
77 } ngx_open_file_cache_t
;
81 ngx_open_file_cache_t
*cache
;
82 ngx_cached_open_file_t
*file
;
85 } ngx_open_file_cache_cleanup_t
;
90 /* ngx_connection_t stub to allow use c->fd as event ident */
96 ngx_cached_open_file_t
*file
;
97 ngx_open_file_cache_t
*cache
;
98 } ngx_open_file_cache_event_t
;
101 ngx_open_file_cache_t
*ngx_open_file_cache_init(ngx_pool_t
*pool
,
102 ngx_uint_t max
, time_t inactive
);
103 ngx_int_t
ngx_open_cached_file(ngx_open_file_cache_t
*cache
, ngx_str_t
*name
,
104 ngx_open_file_info_t
*of
, ngx_pool_t
*pool
);
107 #endif /* _NGX_OPEN_FILE_CACHE_H_INCLUDED_ */