Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 9120

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Flush all existing items at the server</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="memcache.delete.html">Memcache::delete</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="memcache.get.html">Memcache::get</a></div>
 <div class="up"><a href="class.memcache.html">Memcache</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="memcache.flush" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Memcache::flush</h1>
  <p class="verinfo">(PECL memcache &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Memcache::flush</span> &mdash; <span class="dc-title">Flush all existing items at the server</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-memcache.flush-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>Memcache::flush</strong></span>
    ( <span class="methodparam">void</span>
   )</div>


  <p class="para rdfs-comment">
    <span class="function"><strong>Memcache::flush()</strong></span> immediately invalidates all 
   existing items.  <span class="function"><strong>Memcache::flush()</strong></span> doesn&#039;t
   actually free any resources, it only marks all the items as expired, so
   occupied memory will be overwritten by new items.
   Also you can use  <span class="function"><strong>memcache_flush()</strong></span> function.
  </p>

 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-memcache.flush-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-memcache.flush-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-4414">
    <p><strong>Example #1  <span class="function"><strong>Memcache::flush()</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">/*&nbsp;procedural&nbsp;API&nbsp;*/<br /></span><span style="color: #0000BB">$memcache_obj&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">memcache_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'memcache_host'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">11211</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">memcache_flush</span><span style="color: #007700">(</span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*&nbsp;OO&nbsp;API&nbsp;*/<br /><br /></span><span style="color: #0000BB">$memcache_obj&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</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">connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'memcache_host'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">11211</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">flush</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="memcache.delete.html">Memcache::delete</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="memcache.get.html">Memcache::get</a></div>
 <div class="up"><a href="class.memcache.html">Memcache</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>