Skip to content
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

Add cache_method directive: cache the specified request methods only. (#494) #504

Merged
merged 1 commit into from
May 24, 2016

Conversation

keshonok
Copy link
Contributor

No description provided.

@@ -158,6 +159,33 @@ static TfwStr g_crlf = { .ptr = S_CRLF, .len = SLEN(S_CRLF) };
} \
for ( ; c != h_end; ++c, c = (c == u_end) ? h_start : c)

static unsigned int tfw_cache_method_noncacheable = (1 << TFW_HTTP_METH_POST);
Copy link
Contributor

@krizhanovsky krizhanovsky May 24, 2016

Choose a reason for hiding this comment

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

Why TFW_HTTP_METH_POST? The issue requires "GET only must be cached by default" and this is differnt, probably its better to use tfw_cache_meth = (1 << TFW_HTTP_METH_GET) and reverse the logic.

Please don't use so long names, tfw_cache_meth_nc would be enough for the variable and the functions at the below.

@krizhanovsky
Copy link
Contributor

Good to merge after several cleanups

@keshonok keshonok merged commit 6332ef0 into master May 24, 2016
@keshonok keshonok deleted the ab-cfg-cache-method branch May 24, 2016 21:48
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