php-doc-en/reference/session/sessionhandlerinterface/gc.xml
Drak 5a4cbc3780 Update information about SessionHandler and SessionHandlerInterface.
This commit gives a lot more detail and includes important information about
the session workflow that has been missing from the documentation.  It also
clarifies some aspects of how to implement the various callbacks.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@323401 c90b9560-bf6c-de11-be94-00142212c4b1
2012-02-21 05:28:04 +00:00

66 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="sessionhandlerinterface.gc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>SessionHandlerInterface::gc</refname>
<refpurpose>Cleanup old sessions</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>bool</type><methodname>SessionHandlerInterface::gc</methodname>
<methodparam><type>string</type><parameter>maxlifetime</parameter></methodparam>
</methodsynopsis>
<para>
Cleans up expired sessions. Called by <function>session_start</function>,
based on <link linkend="ini.session.gc-divisor">session.gc_divisor</link>,
<link linkend="ini.session.gc-probability">session.gc_probability</link> and
<link linkend="ini.session.gc-maxlifetime">session.gc_lifetime</link> settings.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>maxlifetime</parameter></term>
<listitem>
<para>
Sessions that have not updated for the last <parameter>maxlifetime</parameter> seconds will be removed.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.session.storage.retval;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->