downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/fr/function.session-cache-limiter.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.session.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'fr',
  ),
 
'this' =>
  array (
   
0 => 'function.session-cache-limiter.php',
   
1 => 'session_cache_limiter',
  ),
 
'up' =>
  array (
   
0 => 'ref.session.php',
   
1 => 'Fonctions Session',
  ),
 
'prev' =>
  array (
   
0 => 'function.session-cache-expire.php',
   
1 => 'session_cache_expire',
  ),
 
'next' =>
  array (
   
0 => 'function.session-commit.php',
   
1 => 'session_commit',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.session-cache-limiter" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_cache_limiter</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.3, PHP 5)</p><p class="refpurpose"><span class="refname">session_cache_limiter</span> &mdash; <span class="dc-title">Lit et/ou modifie le limiteur de cache de session</span></p>

 </div>

 <a name="function.session-cache-limiter.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><b>session_cache_limiter</b></span>
    ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$cache_limiter</tt></span>
  ] )</div>

  <p class="para rdfs-comment">
   <b>session_cache_limiter()</b>retourne la configuration
   courante du limiteur de cache.
  </p>
  <p class="para">
   Le limiteur de cache contrôle les en-têtes HTTP envoyés au client.
   Certains en-têtes déterminent les règles de mise en cache de la page
   sur le navigateur. En configurant ce limiteur à <i>nocache</i>,
   par exemple, le navigateur ne mettra pas la page dans son cache. La valeur
   <i>public</i>, au contraire, permettra le cache. La valeur
   <i>private</i> désactive le cache pour le proxy et autorise le
   client à mettre en cache le contenu.
  </p>
  <p class="para">
   En mode <i>private</i>, l&#039;en-tête Expire envoyé au client
   peut poser des problèmes à certains navigateurs, comme, notamment,
   <span class="productname">Mozilla</span>. Vous pouvez éviter ce problème avec le mode
   <i>private_no_expire</i>. L&#039;en-tête <i>Expire</i>
   n&#039;est jamais envoyé au navigateur pour ce mode.
  </p>
  <p class="para">
   Le limiteur de cache est remis à la valeur par défaut de
   <a href="session.configuration.php#ini.session.cache-limiter" class="link"><span class="option">session.cache_limiter</span></a> à chaque
   démarrage de script PHP. Donc, vous devrez appeler <b>session_cache_limiter()</b> à
   chaque page, et avant <a href="function.session-start.php" class="function">session_start()</a>.
  </p>
 </div>


 <a name="function.session-cache-limiter.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">cache_limiter</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Si <i><tt class="parameter">cache_limiter</tt></i>

       est fourni, le limiteur de cache est reconfiguré avec cette valeur.
      </p>
      <table class="doctable table">
       <caption><b>Valeurs possibles</b></caption>
      
        <thead valign="middle">
         <tr valign="middle">
          <th>Valeurs</th>
          <th>Entêtes envoyés</th>
         </tr>

        </thead>

        <tbody valign="middle" class="tbody">
         <tr valign="middle">
          <td align="left"><i>public</i></td>
          <td align="left">
           <div class="example-contents programlisting">
<div class="headercode"><pre class="headercode">Expires: (sometime in the future, according session.cache_expires)
Cache-Control: public, max-age=(sometime in the future, according to session.cache_expire
Last-Modified: (the timestamp of when the session was last saved)</pre>
</div>
           </div>

          </td>
         </tr>

         <tr valign="middle">
          <td align="left"><i>private_no_expire</i></td>
          <td align="left">
           <div class="example-contents programlisting">
<div class="headercode"><pre class="headercode">Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future)
Last-Modified: (the timestamp of when the session was last saved)</pre>
</div>
           </div>

          </td>
         </tr>

         <tr valign="middle">
          <td align="left"><i>private</i></td>
          <td align="left">
           <div class="example-contents programlisting">
<div class="headercode"><pre class="headercode">Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future)
Last-Modified: (the timestamp of when the session was last saved)</pre>
</div>
           </div>

          </td>
         </tr>

         <tr valign="middle">
          <td align="left"><i>nocache</i></td>
          <td align="left">
           <div class="example-contents programlisting">
<div class="headercode"><pre class="headercode">Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache</pre>
</div>
           </div>

          </td>
         </tr>

        </tbody>
      
      </table>

     </dd>

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


 <a name="function.session-cache-limiter.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne le nom du limiteur de cache courant.
  </p>
 </div>


 <a name="function.session-cache-limiter.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Historique</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">4.2.0</td>
       <td align="left">
        Ajout du limiteur de cache <i>private_no_expire</i>.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>
 

 <a name="function.session-cache-limiter.examples"></a><div class="refsect1 examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Exemple #1 Exemple avec <b>session_cache_limiter()</b></b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/*&nbsp;configure&nbsp;le&nbsp;limiteur&nbsp;de&nbsp;cache&nbsp;à&nbsp;'private'&nbsp;*/<br /><br /></span><span style="color: #0000BB">session_cache_limiter</span><span style="color: #007700">(</span><span style="color: #DD0000">'private'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$cache_limiter&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">session_cache_limiter</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Le&nbsp;limiteur&nbsp;de&nbsp;cache&nbsp;vaut&nbsp;maintenant&nbsp;</span><span style="color: #0000BB">$cache_limiter</span><span style="color: #DD0000">&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

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


 <a name="function.session-cache-limiter.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="session.configuration.php#ini.session.cache-limiter" class="link">session.cache_limiter</a></li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites