Package session2 :: Package store :: Module ShelveSessionStore :: Class ShelveSessionStore
[frames | no frames]

Class ShelveSessionStore

SessionStore --+
               |
              ShelveSessionStore


Open a 'shelve' dictionary with the given filename, and store sessions in it.

Shelve is not thread safe or multiprocess safe. See the "Restrictions" section for the shelve module in the Python Library Reference for information about file locking.


Method Summary
  __init__(self, filename)
__init__ takes the filename to use as the shelve store.
  delete_session(self, session)
Delete the given session from the shelf.
  load_session(self, id, default)
Load the session from the shelf.
  open(self)
Open the shelve store file.
  save_session(self, session)
Save the session to the shelf.
    Inherited from SessionStore
  delete_old_sessions(self, minutes)
Delete all sessions that have not been modified for N minutes.
  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.
  setup(self)
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

__init__(self, filename)
(Constructor)

__init__ takes the filename to use as the shelve store.

delete_session(self, session)

Delete the given session from the shelf.

Overrides:
session2.store.SessionStore.SessionStore.delete_session

load_session(self, id, default=None)

Load the session from the shelf.

Overrides:
session2.store.SessionStore.SessionStore.load_session

open(self)

Open the shelve store file.

save_session(self, session)

Save the session to the shelf.

Overrides:
session2.store.SessionStore.SessionStore.save_session

Class Variable Details

is_multiprocess_safe

Type:
bool
Value:
False                                                                  

is_thread_safe

Type:
bool
Value:
False                                                                  

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