Sophie

Sophie

distrib > Mandriva > 9.2 > i586 > media > contrib > by-pkgid > dddfd1c874d00a6a720179bd81bafd8d > files > 116

apache2-mod_python-2.0.47_3.1.0a-2mdk.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>4.8 Session - Session Management</title>
<META NAME="description" CONTENT="4.8 Session - Session Management">
<META NAME="keywords" CONTENT="modpython">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<link rel="STYLESHEET" href="modpython.css">
<link rel="first" href="modpython.html">
<link rel="contents" href="contents.html" title="Contents">
<link rel="index" href="genindex.html" title="Index">
<LINK REL="next" href="pyapi-psp.html">
<LINK REL="previous" href="pyapi-cookie.html">
<LINK REL="up" href="pythonapi.html">
<LINK REL="next" href="pyapi-sess-classes.html">
</head>
<body>
<DIV CLASS="navigation">
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="pyapi-cookie-example.html"><img src="icons/previous.png"
  border="0" height="32"
  alt="Previous Page" width="32"></A></td>
<td><A href="pythonapi.html"><img src="icons/up.png"
  border="0" height="32"
  alt="Up One Level" width="32"></A></td>
<td><A href="pyapi-sess-classes.html"><img src="icons/next.png"
  border="0" height="32"
  alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Mod_python Manual</td>
<td><A href="contents.html"><img src="icons/contents.png"
  border="0" height="32"
  alt="Contents" width="32"></A></td>
<td><img src="icons/blank.png"
  border="0" height="32"
  alt="" width="32"></td>
<td><A href="genindex.html"><img src="icons/index.png"
  border="0" height="32"
  alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="pyapi-cookie-example.html">4.7.3 Examples</A>
<b class="navlabel">Up:</b> <a class="sectref" href="pythonapi.html">4. Python API</A>
<b class="navlabel">Next:</b> <a class="sectref" href="pyapi-sess-classes.html">4.8.1 Classes</A>
<br><hr>
</DIV>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION006800000000000000000">&nbsp;</A>
<BR>
4.8 <tt class="module">Session</tt> - Session Management
</H1>


<P>
The <tt class="module">Session</tt> module provides objects for maintaining persistent
sessions across requests.

<P>
The module contains a <tt class="class">BaseSession</tt> class, which is not meant to
be used directly (it provides no means of storing a session), and a
<tt class="class">DbmSession</tt> class, which uses a dbm to store sessions. 

<P>
The <tt class="class">BaseSession</tt> class also provides session locking, both
across processes and threads. For locking it uses APR global_mutexes
(a number of them is pre-created at startup) The mutex number is
computed by using modulus of the session id
<tt class="function">hash()</tt>. (Therefore it's possible that different session
id's will have the same hash, but the only implication is that those
two sessions cannot be locked at the same time resulting in a slight
delay.)

<P>

<p><hr>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a>

<UL CLASS="ChildLinks">
<LI><A href="pyapi-sess-classes.html">4.8.1 Classes</a>
</ul>
<!--End of Table of Child-Links-->

<DIV CLASS="navigation">
<p><hr>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="pyapi-cookie-example.html"><img src="icons/previous.png"
  border="0" height="32"
  alt="Previous Page" width="32"></A></td>
<td><A href="pythonapi.html"><img src="icons/up.png"
  border="0" height="32"
  alt="Up One Level" width="32"></A></td>
<td><A href="pyapi-sess-classes.html"><img src="icons/next.png"
  border="0" height="32"
  alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Mod_python Manual</td>
<td><A href="contents.html"><img src="icons/contents.png"
  border="0" height="32"
  alt="Contents" width="32"></A></td>
<td><img src="icons/blank.png"
  border="0" height="32"
  alt="" width="32"></td>
<td><A href="genindex.html"><img src="icons/index.png"
  border="0" height="32"
  alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="pyapi-cookie-example.html">4.7.3 Examples</A>
<b class="navlabel">Up:</b> <a class="sectref" href="pythonapi.html">4. Python API</A>
<b class="navlabel">Next:</b> <a class="sectref" href="pyapi-sess-classes.html">4.8.1 Classes</A>
<hr>
<span class="release-info">Release 3.1.0a, documentation updated on August 26, 2003.</span>
</DIV>
<!--End of Navigation Panel-->

</BODY>
</HTML>