

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# memcached 属性
<a name="attributes-recipes-mem"></a>

**重要**  
该 AWS OpsWorks Stacks 服务于 2024 年 5 月 26 日终止，新客户和现有客户均已禁用。我们强烈建议客户尽快将其工作负载迁移到其他解决方案。如果您对迁移有疑问，请通过 re [AWS : Post 或通过 Pre](https://repost.aws/) mium Su [AWS pp](https://aws.amazon.com/support) ort 与 AWS 支持 团队联系。

**注意**  
这些属性仅在 Linux 堆栈上可用。

[`memcached` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/memcached/attributes/default.rb)指定 [Memcached](http://memcached.org/) 服务器配置。有关如何覆盖内置属性以指定自定义值的更多信息，请参阅 [覆盖属性](workingcookbook-attributes.md)。


****  

|  |  |  | 
| --- |--- |--- |
| [memory ](#attributes-recipes-mem-memory) | [max\$1connections ](#attributes-recipes-mem-max) | [pid\$1file ](#attributes-recipes-mem-pid) | 
| [端口 ](#attributes-recipes-mem-port) | [start\$1command ](#attributes-recipes-mem-start) | [stop\$1command ](#attributes-recipes-mem-stop) | 
| [用户 ](#attributes-recipes-mem-user) |  |  | 

**memory **  <a name="attributes-recipes-mem-memory"></a>
要使用的最大内存 (MB) (数字)。默认值为 `512`。  

```
node[:memcached][:memory]
```

**max\$1connections **  <a name="attributes-recipes-mem-max"></a>
最大连接数 (字符串)。默认值为 `'4096'`。  

```
node[:memcached][:max_connections]
```

**pid\$1file **  <a name="attributes-recipes-mem-pid"></a>
包含守护程序进程 ID 的文件 (字符串)。默认值为 `'var/run/memcached.pid'`。  

```
node[:memcached][:pid_file]
```

**端口 **  <a name="attributes-recipes-mem-port"></a>
要侦听的端口 (数字)。默认值为 `11211`。  

```
node[:memcached][:port]
```

**start\$1command **  <a name="attributes-recipes-mem-start"></a>
开始命令 (字符串)。默认值为 `'/etc/init.d/memcached start'`。  

```
node[:memcached][:start_command]
```

**stop\$1command **  <a name="attributes-recipes-mem-stop"></a>
停止命令 (字符串)。默认值为 `'/etc/init.d/memcached stop'`。  

```
node[:memcached][:stop_command]
```

**用户 **  <a name="attributes-recipes-mem-user"></a>
用户 (字符串)。默认值为 `'nobody'`。  

```
node[:memcached][:user]
```