diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-12-22 13:19:39 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-12-22 13:19:39 +0000 |
| commit | f3b0e490693f470913db7ba962a536e275c37147 (patch) | |
| tree | fff8cb622b1d9f95ca6f704f3d83aec8330799e2 /src/http | |
| parent | 5e593aa34ed51cb68670eca25506294165168b93 (diff) | |
| download | nginx-f3b0e490693f470913db7ba962a536e275c37147.tar.gz nginx-f3b0e490693f470913db7ba962a536e275c37147.tar.bz2 | |
open_file_cache_min_uses
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/modules/ngx_http_flv_module.c | 1 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_index_module.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_static_module.c | 1 | ||||
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 1 | ||||
| -rw-r--r-- | src/http/ngx_http_core_module.c | 11 | ||||
| -rw-r--r-- | src/http/ngx_http_core_module.h | 1 | ||||
| -rw-r--r-- | src/http/ngx_http_script.c | 1 |
7 files changed, 18 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_flv_module.c b/src/http/modules/ngx_http_flv_module.c index 2c14d29be..1e8f96faf 100644 --- a/src/http/modules/ngx_http_flv_module.c +++ b/src/http/modules/ngx_http_flv_module.c @@ -107,6 +107,7 @@ ngx_http_flv_handler(ngx_http_request_t *r) of.test_dir = 0; of.valid = clcf->open_file_cache_valid; + of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c index a82b31850..c9622835d 100644 --- a/src/http/modules/ngx_http_index_module.c +++ b/src/http/modules/ngx_http_index_module.c @@ -210,6 +210,7 @@ ngx_http_index_handler(ngx_http_request_t *r) of.test_dir = 0; of.valid = clcf->open_file_cache_valid; + of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; @@ -293,6 +294,7 @@ ngx_http_index_test_dir(ngx_http_request_t *r, ngx_http_core_loc_conf_t *clcf, of.test_dir = 1; of.valid = clcf->open_file_cache_valid; + of.min_uses = 0; of.errors = clcf->open_file_cache_errors; if (ngx_open_cached_file(clcf->open_file_cache, &dir, &of, r->pool) diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c index e89b1cd81..cfc708916 100644 --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -98,6 +98,7 @@ ngx_http_static_handler(ngx_http_request_t *r) of.test_dir = 0; of.valid = clcf->open_file_cache_valid; + of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 771fd81c7..78455b951 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -644,6 +644,7 @@ sendfile(r, filename, offset = -1, bytes = 0) of.test_dir = 0; of.valid = clcf->open_file_cache_valid; + of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 066e1298b..a7da92a74 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -491,6 +491,13 @@ static ngx_command_t ngx_http_core_commands[] = { offsetof(ngx_http_core_loc_conf_t, open_file_cache_valid), &ngx_conf_deprecated_open_file_cache_retest }, + { ngx_string("open_file_cache_min_uses"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + ngx_conf_set_num_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_core_loc_conf_t, open_file_cache_min_uses), + NULL }, + { ngx_string("open_file_cache_errors"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, ngx_conf_set_flag_slot, @@ -2429,6 +2436,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf) lcf->types_hash_bucket_size = NGX_CONF_UNSET_UINT; lcf->open_file_cache = NGX_CONF_UNSET_PTR; lcf->open_file_cache_valid = NGX_CONF_UNSET; + lcf->open_file_cache_min_uses = NGX_CONF_UNSET_UINT; lcf->open_file_cache_errors = NGX_CONF_UNSET; lcf->open_file_cache_events = NGX_CONF_UNSET; @@ -2634,6 +2642,9 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) ngx_conf_merge_sec_value(conf->open_file_cache_valid, prev->open_file_cache_valid, 60); + ngx_conf_merge_uint_value(conf->open_file_cache_min_uses, + prev->open_file_cache_min_uses, 1); + ngx_conf_merge_sec_value(conf->open_file_cache_errors, prev->open_file_cache_errors, 0); diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index d08e9b113..52eb94779 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -296,6 +296,7 @@ struct ngx_http_core_loc_conf_s { ngx_open_file_cache_t *open_file_cache; time_t open_file_cache_valid; + ngx_uint_t open_file_cache_min_uses; ngx_flag_t open_file_cache_errors; ngx_flag_t open_file_cache_events; diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index 0ae27aafe..e30fda254 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -977,6 +977,7 @@ ngx_http_script_file_code(ngx_http_script_engine_t *e) of.test_dir = 0; of.valid = clcf->open_file_cache_valid; + of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; |
