Home | Trees | Index | Help |
|
---|
Package session2 :: Package store :: Module SessionStore :: Class SessionStore |
|
DirectorySessionStore
,
DurusSessionStore
,
MySQLSessionStore
,
PostgresSessionStore
,
ShelveSessionStore
,
VolatileSessionStore
Persistent Session
storage API for session2's SessionManager
.
Subclass this class & provide implementations of load_session
,
save_session
, and delete_session
, and voila, persistent sessions!
Method Summary | |
---|---|
Delete all sessions that have not been modified for N minutes. | |
Delete the session in the store. | |
Return true if the session exists in the store, else false. | |
Return an iterable of (id, session) for all sessions in the store. | |
Return the session if it exists, else return 'default'. | |
Save the session in the store. | |
Initialize the session store; e.g., create required database tables. |
Class Variable Summary | |
---|---|
bool |
is_multiprocess_safe = False
|
bool |
is_thread_safe = False
|
Method Details |
---|
delete_old_sessions(self, minutes)Delete all sessions that have not been modified for N minutes. The default implementation does nothing, meaning the store cannot delete old sessions. This method is never called by the session manager. It's for your application maintenance program; e.g., a daily cron job. |
delete_session(self, session)Delete the session in the store. |
has_session(self, id)Return true if the session exists in the store, else false. |
iter_sessions(self)Return an iterable of (id, session) for all sessions in the store. This method is never called by the session manager; it's for admin applications that want to browse the sessions. |
load_session(self, id, default=None)Return the session if it exists, else return 'default'. |
save_session(self, session)Save the session in the store. |
setup(self)Initialize the session store; e.g., create required database tables. If a previous store exists, overwrite it or raise an error. The default implmenetation does nothing, meaning no setup is necessary. This method is never called by the session manager; it's for your application setup program. |
Class Variable Details |
---|
is_multiprocess_safe
|
is_thread_safe
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Feb 4 16:40:10 2006 | http://epydoc.sf.net |