betz            Fri Mar 14 09:50:35 2003 EDT

  Modified files:              
    /phpdoc/en/reference/session/functions      session-cache-expire.xml 
  Log:
  more verbos description
  example added
  
Index: phpdoc/en/reference/session/functions/session-cache-expire.xml
diff -u phpdoc/en/reference/session/functions/session-cache-expire.xml:1.4 
phpdoc/en/reference/session/functions/session-cache-expire.xml:1.5
--- phpdoc/en/reference/session/functions/session-cache-expire.xml:1.4  Tue Dec 17 
05:36:58 2002
+++ phpdoc/en/reference/session/functions/session-cache-expire.xml      Fri Mar 14 
09:50:35 2003
@@ -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>



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to