Kouhei Sutou
null+****@clear*****
Tue Sep 24 16:57:16 JST 2013
Kouhei Sutou 2013-09-24 16:57:16 +0900 (Tue, 24 Sep 2013) New Revision: 6c218c2f49848b998624273921179e24b039c990 https://github.com/groonga/groonga/commit/6c218c2f49848b998624273921179e24b039c990 Message: groonga-httpd: remove groonga_cache_limit configuration Modified files: src/httpd/nginx-module/ngx_http_groonga_module.c Modified: src/httpd/nginx-module/ngx_http_groonga_module.c (+0 -29) =================================================================== --- src/httpd/nginx-module/ngx_http_groonga_module.c 2013-09-24 16:51:16 +0900 (0c54aaa) +++ src/httpd/nginx-module/ngx_http_groonga_module.c 2013-09-24 16:57:16 +0900 (d81cf00) @@ -39,7 +39,6 @@ typedef struct { grn_log_level log_level; ngx_str_t query_log_path; ngx_open_file_t *query_log_file; - size_t cache_limit; char *config_file; int config_line; char *name; @@ -934,7 +933,6 @@ ngx_http_groonga_create_loc_conf(ngx_conf_t *cf) conf->query_log_path.data = NULL; conf->query_log_path.len = 0; conf->query_log_file = NULL; - conf->cache_limit = NGX_CONF_UNSET_SIZE; conf->config_file = NULL; conf->config_line = 0; @@ -948,8 +946,6 @@ ngx_http_groonga_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) ngx_http_groonga_loc_conf_t *conf = child; ngx_conf_merge_str_value(conf->database_path, prev->database_path, NULL); - ngx_conf_merge_size_value(conf->cache_limit, prev->cache_limit, - GRN_CACHE_DEFAULT_MAX_N_ENTRIES); #ifdef NGX_HTTP_GROONGA_LOG_PATH { @@ -1037,20 +1033,6 @@ ngx_http_groonga_each_loc_conf(ngx_http_conf_ctx_t *http_conf, } } -static void -ngx_http_groonga_set_cache_limit(ngx_http_groonga_loc_conf_t *location_conf, - void *user_data) -{ - unsigned int *max_n_cache_entries; - - if (location_conf->cache_limit == NGX_CONF_UNSET_SIZE) { - return; - } - - max_n_cache_entries = grn_cache_max_nentries(); - *max_n_cache_entries = location_conf->cache_limit; -} - static ngx_int_t ngx_http_groonga_mkdir_p(ngx_log_t *log, const char *dir_name) { @@ -1184,10 +1166,6 @@ ngx_http_groonga_init_process(ngx_cycle_t *cycle) http_conf = (ngx_http_conf_ctx_t *)ngx_get_conf(cycle->conf_ctx, ngx_http_module); - ngx_http_groonga_each_loc_conf(http_conf, - ngx_http_groonga_set_cache_limit, - NULL); - data.log = cycle->log; data.pool = cycle->pool; data.rc = NGX_OK; @@ -1268,13 +1246,6 @@ static ngx_command_t ngx_http_groonga_commands[] = { offsetof(ngx_http_groonga_loc_conf_t, query_log_path), NULL }, - { ngx_string("groonga_cache_limit"), - NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, - ngx_conf_set_size_slot, - NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_groonga_loc_conf_t, cache_limit), - NULL }, - ngx_null_command }; -------------- next part -------------- HTML����������������������������... Download