Documenting the new session_cache_limiter function.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@31722 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jon Parise 2000-09-02 00:51:27 +00:00
parent 328173ad3b
commit 8fd0f38077

View file

@ -832,6 +832,64 @@ session_start();
</refsect1>
</refentry>
<refentry id="function.session-cache-limiter">
<refnamediv>
<refname>session_cache_limiter</refname>
<refpurpose>Get and/or set the current cache limiter</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>session_cache_limiter</function></funcdef>
<paramdef>string
<parameter><optional>cache_limiter</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>session_cache_limiter</function> returns the name of the
current cache limiter. If <parameter>cache_limiter</parameter> is
specified, the name of the current cache limiter is changed to the
new value.
</para>
<para>
The cache limiter controls the cache control HTTP headers sent to the
client. These headers determine the rules by which the page content
may be cached. Setting the cache limiter to <literal>nocache</literal>,
for example, would disallow any client-side caching. A value of
<literal>public</literal>, however, would permit caching. It can also
be set to <literal>private</literal>, which is slightly more restrictive
than <literal>public</literal>.
</para>
<para>
The cache limiter is reset to the default value stored in
<literal>session.cache_limiter</literal> at request startup time. Thus,
you need to call <function>session_cache_limiter</function> for every
request (and before <function>session_start</function> is called).
</para>
<example>
<title><function>session_cache_limiter</function> examples</title>
<programlisting role="php">
&lt;?php
# set the cache limiter to 'private'
session_cache_limiter('private);
$cache_limiter = session_cache_limiter();
echo "The cache limiter is now set to $cache_limiter&lt;p&gt;";
?&gt;
</programlisting>
</example>
<note>
<para>
This function was added in PHP 4.0.3.
</para>
</note>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
@ -849,4 +907,4 @@ sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
-->