Class DatabaseSessionContainer
AquariumClass
--+
|
SessionContainer
--+
|
DatabaseSessionContainer
This is the session container.
I won't bother with any locking. The database can take care of that.
Concerning aquarium.util.AquariumClass: unlike its parent class, this
class does mixin aquarium.util.AquariumClass and does require a ctx
parameter in its constructor. I need to do this in order to get access to
the database connection.
The following class level constants are defined:
- SESSION_CLEANUP_FREQUENCY
- If you're using this module, you probably don't have an "application"
scope. Hence, it'll be hard for you to create a thread to call
cleanup. Hence, I'll call it for you, randomly, every
SESSION_CLEANUP_FREQUENCY calls to open. Set this 0 to forgo this
behavior.
Method Summary |
|
__init__ (self,
ctx)
Call AquariumClass.__init__. |
|
cleanup (self)
Delete all of the expired sessions. |
|
open (self,
sid)
Create or open a session. |
Inherited from SessionContainer |
|
adjustTime (self,
deltaSeconds)
Adjust all of the lastModified keys. |
SESSION_CLEANUP_FREQUENCY
-
- Type:
-
int
- Value:
|