Package web :: Package web :: Module session :: Class DBStore
[hide private]
[frames] | no frames]

Class DBStore

source code

Store --+
        |
       DBStore

Store for saving a session in database
Needs a table with the following columns:

    session_id CHAR(128) UNIQUE NOT NULL,
    atime DATETIME NOT NULL default current_timestamp,
    data TEXT

Instance Methods [hide private]
 
__init__(self, db, table_name) source code
 
__contains__(self, key) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__delitem__(self, key) source code
 
cleanup(self, timeout)
removes all the expired sessions
source code

Inherited from Store: decode, encode

Method Details [hide private]

__contains__(self, key)
(In operator)

source code 
Overrides: Store.__contains__

__getitem__(self, key)
(Indexing operator)

source code 
Overrides: Store.__getitem__

__setitem__(self, key, value)
(Index assignment operator)

source code 
Overrides: Store.__setitem__

cleanup(self, timeout)

source code 

removes all the expired sessions

Overrides: Store.cleanup
(inherited documentation)