These modules are all compiled into Nginx by default unless a module is manually specified to be excluded in configure.
Use this module to simply process caching.
Sample configuration:
server {location/{set $memcached _key $uri; memcached_pass http://www.aliyun.com/zixun/aggregation/11696.html ">name : 11211; Default_type html; Error_page 404 =/fallback; } location =/fallback {Proxy_pass backend;}}
Instructions
Memcached_pass
Syntax: Memcached_pass [Name:port]
Default value: None
Working with fields: HTTP, server, location
The backend needs to set some data in the memcached, memcached key is "/uri?args".
After version 0.5.9, memcached key is stored in the variable $memcached_key.
Memcached_connect_timeout
Syntax: memcached_connect_timeout [TIME]
Default value: 60s
Working with fields: HTTP, server, location
The timeout for connecting the memcached service in seconds.
You can specify a time unit to avoid confusion, and the supported time units have "s" (seconds). MS "(milliseconds)," Y "(year)," M "(month)," W "(week)," D "(Day)," H "(hour), and" M "(minutes).
Memcached_read_timeout
Syntax: memcached_read_timeout [TIME]
Default value: 60s
Working with fields: HTTP, server, location
Timeout for reading memcached data in seconds.
You can specify a time unit to avoid confusion, and the supported time units have "s" (seconds). MS "(milliseconds)," Y "(year)," M "(month)," W "(week)," D "(Day)," H "(hour), and" M "(minutes).
Memcached_send_timeout
Syntax: memcached_send_timeout [TIME]
Default value: 60s
Working with fields: HTTP, server, location
Timeout for sending memcached data in seconds.
You can specify a time unit to avoid confusion, and the supported time units have "s" (seconds). MS "(milliseconds)," Y "(year)," M "(month)," W "(week)," D "(Day)," H "(hour), and" M "(minutes).
Memcached_buffer_size
Syntax: memcached_buffer_size [size]
Default value: GetPageSize (2)
Working with fields: HTTP, server, location
The size of the sent/received buffer, in bytes.
Memcached_next_upstream
Syntax: memcached_next_upstream [ERROR | timeout | invalid_response | not_found | off]
Default Value: Error timeout
Working with fields: HTTP, server, location
Specifies in which error state the request will be forwarded to a different load-balancing server, only if the Memcached_pass has two or more than two values.
Variable
$memcached _key
The value of the Memcached key.