

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

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

**重要**  
 AWS OpsWorks Stacks 此服務已於 2024 年 5 月 26 日終止，並已針對新客戶和現有客戶停用。我們強烈建議客戶盡快將其工作負載遷移至其他解決方案。如果您對遷移有任何疑問，請透過 [AWS re：Post](https://repost.aws/) 或透過 [AWS Premium Support](https://aws.amazon.com/support) 聯絡 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) | 
| [port ](#attributes-recipes-mem-port) | [start\$1command ](#attributes-recipes-mem-start) | [stop\$1command ](#attributes-recipes-mem-stop) | 
| [user ](#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]
```

**port **  <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]
```

**user **  <a name="attributes-recipes-mem-user"></a>
使用者 (字串)。預設值為 `'nobody'`。  

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