Home | Trees | Index | Help |
|
---|
Package session2 :: Package store :: Module MySQLSessionStore :: Class MySQLSessionStore |
|
SessionStore
--+
|
MySQLSessionStore
Method Summary | |
---|---|
__init__ takes a MySQLdb connection object, together with an optional 'table' argument containing the name of the table to use. | |
Delete all sessions that have not been modified for N minutes. | |
Delete the session in the store. | |
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. | |
Inherited from SessionStore | |
Return true if the session exists in the store, else false. |
Class Variable Summary | |
---|---|
bool |
is_multiprocess_safe = True
|
bool |
is_thread_safe = False
|
int |
pickle_protocol = 2 |
Method Details |
---|
__init__(self,
conn,
table=None)
|
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.
|
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
|
pickle_protocol
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Feb 4 16:40:10 2006 | http://epydoc.sf.net |