<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.memcache.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'memcache.setcompressthreshold.php',
    1 => 'Memcache::setCompressThreshold',
    2 => 'Enable automatic compression of large values',
  ),
  'up' => 
  array (
    0 => 'class.memcache.php',
    1 => 'Memcache',
  ),
  'prev' => 
  array (
    0 => 'memcache.set.php',
    1 => 'Memcache::set',
  ),
  'next' => 
  array (
    0 => 'memcache.setserverparams.php',
    1 => 'Memcache::setServerParams',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/memcache/memcache/setcompressthreshold.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="memcache.setcompressthreshold" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Memcache::setCompressThreshold</h1>
  <h1 class="refname">memcache_set_compress_threshold</h1>
  <p class="verinfo">(PECL memcache &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Memcache::setCompressThreshold</span> -- <span class="refname">memcache_set_compress_threshold</span> &mdash; <span class="dc-title">Enable automatic compression of large values</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-memcache.setcompressthreshold-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>Memcache::setCompressThreshold</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$threshold</code></span>, <span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$min_savings</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <div class="methodsynopsis dc-description"><span class="methodname"><strong>memcache_set_compress_threshold</strong></span>(<span class="methodparam"><span class="type"><a href="class.memcache.php" class="type Memcache">Memcache</a></span> <code class="parameter">$memcache</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$threshold</code></span>, <span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$min_savings</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>


  <p class="simpara">
   <span class="function"><strong>Memcache::setCompressThreshold()</strong></span> enables automatic
   compression of large values.
  </p>

  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <span class="simpara">
    This function has been added to Memcache version 2.0.0.
   </span>
  </p></blockquote>

 </div>


 <div class="refsect1 parameters" id="refsect1-memcache.setcompressthreshold-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">threshold</code></dt>
    <dd>
     <span class="simpara">
      Controls the minimum value length before attempting to compress automatically.
     </span>
    </dd>
   
   
    <dt><code class="parameter">min_saving</code></dt>
    <dd>
     <span class="simpara">
      Specifies the minimum amount of savings to actually store the value
      compressed. The supplied value must be between 0 and 1. Default value
      is 0.2 giving a minimum 20% compression savings.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-memcache.setcompressthreshold-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-memcache.setcompressthreshold-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>Memcache::setCompressThreshold()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/* OO API */<br /><br /></span><span style="color: #0000BB">$memcache_obj </span><span style="color: #007700">= new </span><span style="color: #0000BB">Memcache</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">'memcache_host'</span><span style="color: #007700">, </span><span style="color: #0000BB">11211</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setCompressThreshold</span><span style="color: #007700">(</span><span style="color: #0000BB">20000</span><span style="color: #007700">, </span><span style="color: #0000BB">0.2</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* procedural API */<br /><br /></span><span style="color: #0000BB">$memcache_obj </span><span style="color: #007700">= </span><span style="color: #0000BB">memcache_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'memcache_host'</span><span style="color: #007700">, </span><span style="color: #0000BB">11211</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">memcache_set_compress_threshold</span><span style="color: #007700">(</span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">, </span><span style="color: #0000BB">20000</span><span style="color: #007700">, </span><span style="color: #0000BB">0.2</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


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