Sophie

Sophie

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

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>Set cache</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httpresponse.setbuffersize.html">HttpResponse::setBufferSize</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httpresponse.setcachecontrol.html">HttpResponse::setCacheControl</a></div>
 <div class="up"><a href="class.httpresponse.html">HttpResponse</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="httpresponse.setcache" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">HttpResponse::setCache</h1>
  <p class="verinfo">(PECL pecl_http &gt;= 0.10.0)</p><p class="refpurpose"><span class="refname">HttpResponse::setCache</span> &mdash; <span class="dc-title">Set cache</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-httpresponse.setcache-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">static</span>
   <span class="type">bool</span> <span class="methodname"><strong>HttpResponse::setCache</strong></span>
    ( <span class="methodparam"><span class="type">bool</span> <code class="parameter">$cache</code></span>
   )</div>

  <p class="para rdfs-comment">
   Whether it should be attempted to cache the entity.
  </p>
  <p class="para">
   This will result in necessary caching headers and checks of clients
   <em>If-Modified-Since</em> and <em>If-None-Match</em> headers. If one of those headers
   matches a <em>304 Not Modified</em> status code will be issued.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    If you&#039;re using sessions, be sure that you set session.cache_limiter
    to something more appropriate than &quot;no-cache&quot;!
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-httpresponse.setcache-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">cache</code></em></span>
     <dd>

      <p class="para">
       whether caching should be attempted
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-httpresponse.setcache-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 seealso" id="refsect1-httpresponse.setcache-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="methodname"><a href="httpresponse.setcachecontrol.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::setCacheControl()</a> - Set cache control</span></li>
    <li class="member"> <span class="methodname"><a href="httpresponse.getcachecontrol.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::getCacheControl()</a> - Get cache control</span></li>
    <li class="member"> <span class="methodname"><strong>HttpResponse::getCachel()</strong></span></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httpresponse.setbuffersize.html">HttpResponse::setBufferSize</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httpresponse.setcachecontrol.html">HttpResponse::setCacheControl</a></div>
 <div class="up"><a href="class.httpresponse.html">HttpResponse</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>