<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/memcache.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'memcache.ini.php',
    1 => 'Runtime Configuration',
    2 => 'Runtime Configuration',
  ),
  'up' => 
  array (
    0 => 'memcache.setup.php',
    1 => 'Installing/Configuring',
  ),
  'prev' => 
  array (
    0 => 'memcache.installation.php',
    1 => 'Installation',
  ),
  'next' => 
  array (
    0 => 'memcache.resources.php',
    1 => 'Resource Types',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/memcache/ini.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="memcache.ini" class="section">
 <h2 class="title">Runtime Configuration</h2>
 <p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Memcache Configuration Options</strong></caption>
   
    <thead>
     <tr>
      <th>Name</th>
      <th>Default</th>
      <th>Changeable</th>
      <th>Changelog</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="memcache.ini.php#ini.memcache.allow-failover" class="link">memcache.allow_failover</a></td>
      <td>&quot;1&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Available since memcache 2.0.2.</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.max-failover-attempts" class="link">memcache.max_failover_attempts</a></td>
      <td>&quot;20&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Available since memcache 2.1.0.</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.chunk-size" class="link">memcache.chunk_size</a></td>
      <td>&quot;8192&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Available since memcache 2.0.2.</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.default-port" class="link">memcache.default_port</a></td>
      <td>&quot;11211&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Available since memcache 2.0.2.</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.hash-strategy" class="link">memcache.hash_strategy</a></td>
      <td>&quot;standard&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Available since memcache 2.2.0.</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.hash-function" class="link">memcache.hash_function</a></td>
      <td>&quot;crc32&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Available since memcache 2.2.0.</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.protocol" class="link">memcache.protocol</a></td>
      <td>ascii</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 3.0.0</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.redundancy" class="link">memcache.redundancy</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 3.0.0</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.session-redundancy" class="link">memcache.session_redundancy</a></td>
      <td>2</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 3.0.0</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.compress-threshold" class="link">memcache.compress_threshold</a></td>
      <td>20000</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 3.0.3</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.lock-timeout" class="link">memcache.lock_timeout</a></td>
      <td>15</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 3.0.4</td>
     </tr>

    </tbody>
   
  </table>

  <table class="doctable table">
   <caption><strong>Session Configuration Options Affecting Memcache Behavior</strong></caption>
   
    <thead>
     <tr>
      <th>Name</th>
      <th>Default</th>
      <th>Changeable</th>
      <th>Changelog</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="memcache.ini.php#ini.memcache.save-handler" class="link">session.save_handler</a></td>
      <td>&quot;files&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 2.1.2</td>
     </tr>

     <tr>
      <td><a href="memcache.ini.php#ini.memcache.save-path" class="link">session.save_path</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>Supported since memcache 2.1.2</td>
     </tr>

    </tbody>
   
  </table>

  For further details and definitions of the
INI_* modes, see the <a href="configuration.changes.modes.php" class="xref">Where a configuration setting may be set</a>.
 </p>

<p class="para">Here&#039;s a short explanation of
the configuration directives.</p>

<dl>

 
  <dt id="ini.memcache.allow-failover">
   <code class="parameter">memcache.allow_failover</code>
   <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Whether to transparently failover to other servers on
    errors.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.max-failover-attempts">
   <code class="parameter">memcache.max_failover_attempts</code>
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Defines how many servers to try when setting and getting data.
    Used only in conjunction with memcache.allow_failover.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.chunk-size">
   <code class="parameter">memcache.chunk_size</code>
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Data will be transferred in chunks of this size, setting
    the value lower requires more network writes. Try
    increasing this value to 32768 if noticing otherwise
    inexplicable slowdowns.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.default-port">
   <code class="parameter">memcache.default_port</code>
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
  </dt>
  <dd>
   <span class="simpara">
    The default TCP port number to use when connecting to
    the memcached server if no other port is specified.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.hash-strategy">
   <code class="parameter">memcache.hash_strategy</code>
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Controls which strategy to use when mapping keys to servers. Set this value to
    <code class="literal">consistent</code> to enable consistent hashing which allows servers
    to be added or removed from the pool without causing keys to be remapped.
    Setting this value to <code class="literal">standard</code> results in the old strategy
    being used.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.hash-function">
   <code class="parameter">memcache.hash_function</code>
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Controls which hash function to apply when mapping keys to servers, <code class="literal">crc32</code>
    uses the standard CRC32 hash while <code class="literal">fnv</code> uses FNV-1a.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.protocol">
   <code class="parameter">memcache.protocol</code>
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
  </dt>
  <dd>
   <span class="simpara">

   </span>
  </dd>
 

 
  <dt id="ini.memcache.redundancy">
   <code class="parameter">memcache.redundancy</code>
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
  </dt>
  <dd>
   <span class="simpara">

   </span>
  </dd>
 

 
  <dt id="ini.memcache.session-redundancy">
   <code class="parameter">memcache.session_redundancy</code>
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
  </dt>
  <dd>
   <span class="simpara">

   </span>
  </dd>
 

 
  <dt id="ini.memcache.compress-threshold">
   <code class="parameter">memcache.compress_threshold</code>
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
  </dt>
  <dd>
   <span class="simpara">

   </span>
  </dd>
 

 
  <dt id="ini.memcache.lock-timeout">
   <code class="parameter">memcache.lock_timeout</code>
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
  </dt>
  <dd>
   <span class="simpara">

   </span>
  </dd>
 

 
  <dt id="ini.memcache.save-handler">
   <code class="parameter">session.save_handler</code>
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Use memcache as a session handler by setting this value to <code class="literal">memcache</code>.
   </span>
  </dd>
 

 
  <dt id="ini.memcache.save-path">
   <code class="parameter">session.save_path</code>
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
  </dt>
  <dd>
   <span class="simpara">
    Defines a comma separated of server urls to use for session storage, for example
    <code class="literal">&quot;tcp://host1:11211, tcp://host2:11211&quot;</code>.
   </span>
   <span class="simpara">
    Each url may contain parameters which are applied to that server, they are the same
    as for the <span class="function"><a href="memcache.addserver.php" class="function">Memcache::addServer()</a></span> method. For example
    <code class="literal">&quot;tcp://host1:11211?persistent=1&amp;weight=1&amp;timeout=1&amp;retry_interval=15&quot;</code>
   </span>
  </dd>
 

</dl>
</div><?php manual_footer($setup); ?>