Package session2 :: Package store :: Module MySQLSessionStore
[frames | no frames]

Module session2.store.MySQLSessionStore

Store sessions in a MySQL table.

Two extra methods are provided, .create_table and .delete_old_sessions. These are not called by session2 but may be useful in your programs. They use a third column of type TIMESTAMP, which MySQL automatically updates whenever the row changes.

This module assumes the table is non-transactional (no commit or rollback). That's the most popular type of MySQL table, and you can't rollback a non-transactional table or you'll sometimes get an "incomplete rollback error".

Use a separate database connection for sessions than for your other SQL code, to avoid incompatible code stomping on each other's transactions.


Classes
MySQLSessionStore  

Variable Summary
str DEFAULT_TABLE = 'sessions'

Variable Details

DEFAULT_TABLE

Type:
str
Value:
'sessions'                                                             

Generated by Epydoc 2.1 on Sat Feb 4 16:40:10 2006 http://epydoc.sf.net