Class Session
AquariumClass
--+
|
Session
This is a MySQL backend for aquarium.session.DatabaseSessionContainer.
To use this module, you'll need to add this to your schema:
CREATE TABLE Session
(
sid CHAR(20) NOT NULL,
last_modified TIMESTAMP NOT NULL,
pickle LONGBLOB,
PRIMARY KEY(sid)
);
To store pickles that are really large, you'll also need to update your
my.cnf:
[mysqld]
...
set-variable = max_allowed_packet=16M
The following class level constants are defined:
- TABLE_NAME
- This is the name of the table to store sessions in.
Method Summary |
|
cleanup (self)
Delete all of the expired sessions. |
|
exists (self,
sid)
Does a session with the given sid exist? |
|
load (self,
sid)
Load a session. |
|
save (self,
session,
pickle)
Persist a session. |
Inherited from AquariumClass |
|
__init__ (self,
ctx)
Set a reference to ctx. |
cleanup(self)
Delete all of the expired sessions.
-
|
exists(self,
sid)
Does a session with the given sid exist?
This implies that it is not expired.
-
|
load(self,
sid)
Load a session.
Return it in its pickled form.
-
|
save(self,
session,
pickle)
Persist a session.
-
|
TABLE_NAME
-
- Type:
-
str
- Value:
|