ChsMemcachedModule
Contents |
[edit] ngx_http_memcached_module
浣犲彲浠ュ埄鐢ㄦ湰妯″潡鏉ヨ繘琛岀畝鍗曠殑缂撳瓨浠ユ彁楂樼郴缁熸晥鐜囥傛湰妯″潡璁″垝鍦ㄦ湭鏉ヨ繘琛屾墿灞曘
__閰嶇疆绀轰緥__
server {
: location / {
: set $memcached_key $uri;
: memcached_pass name:11211;
: default_type text/html;
: error_page 404 = /fallback;
: }
: location = /fallback {
: proxy_pass backend;
: }
}
[edit] 鎸囦护
- [#memcached_pass memcached_pass]
- [#memcached_connect_timeout memcached_connect_timeout]
- [#memcached_send_timeout memcached_send_timeout]
- [#memcached_read_timeout memcached_read_timeout]
- [#memcached_buffer_size memcached_buffer_size]
- [#memcached_next_upstream memcached_next_upstream]
[edit] 鍙橀噺
- $memcached_key
[edit] memcached_pass
璇硶锛 memcached_pass [ name:port ]
榛樿鍊硷細 none
浣滅敤鍩燂細 http, server, location
The backend should set the data in memcached. The memcached key is "/uri?args".
Since 0.5.9 the memcached key is now in $memcached_key.
[edit] memcached_connect_timeout
璇硶锛 memcached_connect_timeout [ time ]
榛樿鍊硷細 60000
浣滅敤鍩燂細 http, server, location
The timeout for connecting to memcached, in milliseconds.
[edit] memcached_read_timeout
璇硶锛 memcached_read_timeout [ time ]
榛樿鍊硷細 60000
浣滅敤鍩燂細 http, server, location
The timeout for reading from memcached, in milliseconds.
[edit] memcached_send_timeout
璇硶锛 memcached_send_timeout [ time ]
榛樿鍊硷細 60000
浣滅敤鍩燂細 http, server, location
The timeout for sending to memcached, in milliseconds.
[edit] memcached_buffer_size
璇硶锛 memcached_buffer_size [ size ]
榛樿鍊硷細 see getpagesize(2)
浣滅敤鍩燂細 http, server, location
The recv/send buffer size, in bytes.
[edit] memcached_next_upstream
璇硶锛 memcached_next_upstream [ error | timeout | invalid_response | not_found | off ]
榛樿鍊硷細 error timeout
浣滅敤鍩燂細 http, server, location
Which failure conditions should cause the request to be forwarded to another upstream server? Applies only when the value in memcached_pass is an upstream with two or more servers.










