Skip to content

srcache_store_max_size as complex value type #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Flashed
Copy link

@Flashed Flashed commented Feb 14, 2022

No description provided.

@zhuizhuhaomeng
Copy link
Contributor

No description provided.

Hello @Flashed .
Thanks for your contribution.
We need to add some test cases to cover the new feature.
And need to update the doc.

Comment on lines +324 to +327
if (conf->store_max_size == NULL) {
conf->store_max_size = prev->store_max_size;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (conf->store_max_size == NULL) {
conf->store_max_size = prev->store_max_size;
}

@@ -305,7 +304,7 @@ ngx_http_srcache_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_size_value(conf->buf_size, prev->buf_size,
(size_t) ngx_pagesize);

ngx_conf_merge_size_value(conf->store_max_size, prev->store_max_size, 0);
ngx_conf_merge_ptr_value(conf->store_max_size, prev->store_max_size, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ngx_conf_merge_ptr_value(conf->store_max_size, prev->store_max_size, 0);
ngx_conf_merge_ptr_value(conf->store_max_size, prev->store_max_size, NULL);

@@ -269,7 +269,6 @@ ngx_http_srcache_create_loc_conf(ngx_conf_t *cf)
conf->store = NGX_CONF_UNSET_PTR;

conf->buf_size = NGX_CONF_UNSET_SIZE;
conf->store_max_size = NGX_CONF_UNSET_SIZE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conf->store_max_size = NGX_CONF_UNSET_PTR;

@@ -53,7 +53,7 @@ typedef struct {
ngx_http_srcache_request_t *fetch;
ngx_http_srcache_request_t *store;
size_t buf_size;
size_t store_max_size;
ngx_http_complex_value_t *store_max_size;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ngx_http_complex_value_t *store_max_size;
ngx_http_complex_value_t *store_max_size;

@zhuizhuhaomeng
Copy link
Contributor

_ No description provided. _

we need to add some test cases to covert the new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants