### 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