### Memcached
你可以利用本模塊來進行簡單的緩存以提高系統效率。本模塊計劃在未來進行擴展。
__配置示例__
~~~
server {
: location / {
: set $memcached_key $uri;
: memcached_pass name:11211;
: default_type text/html;
: error_page 404 = /fallback;
: }
: location = /fallback {
: proxy_pass backend;
: }
}
~~~
### 指令
- [#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]
### 變量
- $memcached_key
### 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`.
### memcached_connect_timeout
**語法:***memcached_connect_timeout [ time ]*
**默認值:***60000*
**作用域:***http, server, location*
The timeout for connecting to memcached, in milliseconds.
### memcached_read_timeout
**語法:***memcached_read_timeout [ time ]*
**默認值:***60000*
**作用域:***http, server, location*
The timeout for reading from memcached, in milliseconds.
### memcached_send_timeout
**語法:***memcached_send_timeout [ time ]*
**默認值:***60000*
**作用域:***http, server, location*
The timeout for sending to memcached, in milliseconds.
### memcached_buffer_size
**語法:***memcached_buffer_size [ size ]*
**默認值:** see *getpagesize(2)*
**作用域:***http, server, location*
The recv/send buffer size, in bytes.
### 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.
- 主要文檔
- Nginx功能概述
- 為什么選擇Nginx
- Nginx安裝
- 運行和控制Nginx
- 配置符號參考
- 優化 Nginx
- 常見問題(FAQ)
- 調試 nginx
- 核心模塊
- Nginx主模塊
- Nginx事件模塊
- 基本模塊
- http核心模塊
- HttpIndex模塊
- HttpAccess模塊
- HttpAuthBasic模塊
- HttpAutoindex模塊
- Browser模塊
- Charset模塊
- HttpEmptyGif模塊
- HttpFcgi模塊
- Geo模塊
- HttpGzip模塊
- HttpHeaders模塊
- HttpIndex模塊
- HttpReferer模塊
- HttpLimit zone
- HttpLimitReqest模塊
- HttpLog模塊
- map
- Memcached
- HttpProxy模塊
- HttpRewrite模塊
- HttpSSI模塊
- HttpUserId
- 其他模塊
- Addition模塊
- EmbeddedPerl
- flv
- HttpGzipStatic
- RandomIndex
- HttpGeoIP
- HttpRealIp
- HttpSSL
- StubStatus模塊
- HttpSubstitution
- HttpDav模塊
- GooglePerftools
- HttpXSLT
- HttpSecureLink
- HttpImageFilter
- mail模塊
- MailCore
- MailAuth
- MailProxy
- MailSSL
- 安裝
- nginx在windows上的安裝
- nginx在freebsd上的安裝
- nginx在ubuntu上的安裝
- nginx在fedora上的安裝
- nginx php-fpm安裝配置
- 配置示例和方法
- 完整例子
- 完整例子2
- 虛擬主機
- 負載均衡
- nginx防盜鏈
- HWLoadbalancerCheckErrors