http-memc #
Extended memcached client — adds the missing memcached verbs (add, set, replace, append, prepend, delete, flush_all, stats, version) that the bundled memcached_pass module is missing.
Source: upstream source
Directives
memc_buffer_size #
syntax: memc_buffer_size 1 arg (size (k/m/g)); · context: http, server, location
Size in bytes; accepts k / m / g suffixes.
memc_cmds_allowed #
syntax: memc_cmds_allowed 1+ args; · context: http, server, location, location-if
Restricts which memcached commands the location is permitted to execute.
memc_connect_timeout #
syntax: memc_connect_timeout 1 arg (duration in ms); · context: http, server, location
For conditional GET, it will signal nginx to return 304 Not Modified response to save bandwidth. Back to TOC memc_connect_timeout -------------------- syntax: memc_connect_timeout <time> default: 60s context: http, server, location The timeout for connecting to the memcached server, in seconds by default.
memc_flags_to_last_modified #
syntax: memc_flags_to_last_modified on | off (on/off flag); · context: location, location-if
An example is Back to TOC memc_flags_to_last_modified --------------------------- syntax: memc_flags_to_last_modified on|off default: off context: http, server, location, if Read the memcached flags as epoch seconds and set it as the value of the Last-Modified header.
memc_ignore_client_abort #
syntax: memc_ignore_client_abort on | off (on/off flag); · context: location, location-if
This default size is the page size, may be 4k or 8k. Back to TOC 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.
memc_next_upstream #
syntax: memc_next_upstream 1+ args (bitmask); · context: http, server, location
Bitmask — combine several keywords.
memc_pass #
syntax: memc_pass 1 arg; · context: location, location-if
For example, the memcached_pass directive is spelled memc_pass.
memc_read_timeout #
syntax: memc_read_timeout 1 arg (duration in ms); · context: http, server, location
This time must be less than 597 hours. Back to TOC memc_read_timeout ----------------- syntax: memc_read_timeout <time> default: 60s context: http, server, location The timeout for reading TCP responses from the memcached server, in seconds by default.
memc_send_timeout #
syntax: memc_send_timeout 1 arg (duration in ms); · context: http, server, location
This time must be less than 597 hours. Back to TOC memc_send_timeout ----------------- syntax: memc_send_timeout <time> default: 60s context: http, server, location The timeout for sending TCP requests to the memcached server, in seconds by default.
memc_upstream_fail_timeout #
syntax: memc_upstream_fail_timeout 1 arg; · context: http, server, location
Rejects configuration: directive is unsupported, directs user to the upstream server's fail_timeout parameter instead.
memc_upstream_max_fails #
syntax: memc_upstream_max_fails 1 arg; · context: http, server, location
Rejects configuration: directive is unsupported, directs user to the upstream server's max_fails parameter instead.
Example
memc_connect_timeout 10ms;
memc_send_timeout 10ms;
location /stats {
set $memc_cmd stats;
memc_pass 127.0.0.2:12345;
}