Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

feature: added new config directive memc_ignore_client_abort. thanks …

…Eldar Zaitov for the patch in #14.
  • Loading branch information...
commit fdfa14b5b9e6bd4b4971b74165fc7f6cd6f989a1 1 parent 8f7ae90
@agentzh agentzh authored
View
15 README.markdown
@@ -41,6 +41,7 @@ Table of Contents
* [memc_send_timeout](#memc_send_timeout)
* [memc_read_timeout](#memc_read_timeout)
* [memc_buffer_size](#memc_buffer_size)
+ * [memc_ignore_client_abort](#memc_ignore_client_abort)
* [Installation](#installation)
* [For Developers](#for-developers)
* [Compatibility](#compatibility)
@@ -580,6 +581,20 @@ This default size is the page size, may be `4k` or `8k`.
[Back to TOC](#table-of-contents)
+memc_ignore_client_abort
+------------------------
+**syntax:** *memc_ignore_client_abort on|off*
+
+**default:** *off*
+
+**context:** *location*
+
+Determines whether the connection with a memcache server should be closed when a client closes a connection without waiting for a response.
+
+This directive was first added in the `v0.14` release.
+
+[Back to TOC](#table-of-contents)
+
Installation
============
View
11 doc/HttpMemcModule.wiki
@@ -431,6 +431,17 @@ This buffer size is used for the memory buffer to hold
This default size is the page size, may be <code>4k</code> or <code>8k</code>.
+== memc_ignore_client_abort ==
+'''syntax:''' ''memc_ignore_client_abort on|off''
+
+'''default:''' ''off''
+
+'''context:''' ''location''
+
+Determines whether the connection with a memcache server should be closed when a client closes a connection without waiting for a response.
+
+This directive was first added in the <code>v0.14</code> release.
+
= Installation =
You're recommended to install this module (as well as the Nginx core and many other goodies) via the [http://openresty.org ngx_openresty bundle]. See the [http://openresty.org/#Installation installation steps] for <code>ngx_openresty</code>.
View
13 src/ngx_http_memc_module.c
@@ -117,6 +117,13 @@ static ngx_command_t ngx_http_memc_commands[] = {
offsetof(ngx_http_memc_loc_conf_t, flags_to_last_modified),
NULL },
+ { ngx_string("memc_ignore_client_abort"),
+ NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_memc_loc_conf_t, upstream.ignore_client_abort),
+ NULL },
+
ngx_null_command
};
@@ -181,10 +188,11 @@ ngx_http_memc_create_loc_conf(ngx_conf_t *cf)
conf->upstream.buffer_size = NGX_CONF_UNSET_SIZE;
+ conf->upstream.ignore_client_abort = NGX_CONF_UNSET;
+
/* the hardcoded values */
conf->upstream.cyclic_temp_file = 0;
conf->upstream.buffering = 0;
- conf->upstream.ignore_client_abort = 0;
conf->upstream.send_lowat = 0;
conf->upstream.bufs.num = 0;
conf->upstream.busy_buffers_size = 0;
@@ -240,6 +248,9 @@ ngx_http_memc_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
conf->cmds_allowed = prev->cmds_allowed;
}
+ ngx_conf_merge_value(conf->upstream.ignore_client_abort,
+ prev->upstream.ignore_client_abort, 0);
+
return NGX_CONF_OK;
}
Please sign in to comment.
Something went wrong with that request. Please try again.