mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
more verbos description
example added git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@120247 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
787a473b56
commit
daaca87036
1 changed files with 46 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/session.xml, last change in rev 1.38 -->
|
||||
<refentry id='function.session-cache-expire'>
|
||||
<refnamediv>
|
||||
|
@ -14,13 +14,53 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
<function>session_cache_expire</function> returns the current setting of
|
||||
<link linkend="ini.session.cache-expire">session.cache_expire</link>
|
||||
from &php.ini;. If <parameter>new_cache_expire</parameter> is given, the
|
||||
current cache expire is replaced with <parameter>new_cache_expire</parameter>.
|
||||
<literal>session.cache_expire</literal>. The value returned should be read
|
||||
in minutes, defaults to 180. If <parameter>new_cache_expire</parameter>
|
||||
is given, the current cache expire is replaced with
|
||||
<parameter>new_cache_expire</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Also see the <link linkend="ini.session.cache-expire">session.cache_expire</link>
|
||||
configuration directive.
|
||||
The cache expire is reset to the default value of 180 stored in
|
||||
<literal>session.cache_limiter</literal> at request startup time. Thus,
|
||||
you need to call <function>session_cache_expire</function> for every
|
||||
request (and before <function>session_start</function> is called).
|
||||
</para>
|
||||
<example>
|
||||
<title><function>session_cache_expire</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
/* set the cache limiter to 'private' */
|
||||
|
||||
session_cache_limiter('private');
|
||||
$cache_limiter = session_cache_limiter();
|
||||
|
||||
/* set the cache expire to 30 minutes */
|
||||
session_cache_expire (30);
|
||||
$cache_expire = session_cache_expire();
|
||||
|
||||
/* start the session */
|
||||
|
||||
session_start();
|
||||
|
||||
echo "The cache limiter is now set to $cache_limiter</ br>";
|
||||
echo "The cached session pages expire after $cache_expire minutes";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<note>
|
||||
<simpara>
|
||||
Setting <parameter>new_cache_expire</parameter> is of value only, if
|
||||
<literal>session.cache_limiter</literal> is set to a value
|
||||
<emphasis>different</emphasis> from <literal>nocache</literal>.
|
||||
</simpara>
|
||||
</note>
|
||||
<para>
|
||||
See also the configuration settings <link linkend="ini.session.cache-expire">
|
||||
session.cache_expire</link>, <link linkend="ini.session.cache-limiter">
|
||||
session.cache_limiter</link> and <function>session_cache_limiter</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue