class documentation
class DirectorySessionStore(SessionStore):
Constructor: DirectorySessionStore(directory, create)
Store sessions in individual files within a directory.
Method | __init__ |
__init__ takes a directory name, with an option to create it if it's not already there. |
Method | delete |
Delete all sessions that have not been modified for N minutes. |
Method | delete |
Delete the session file. |
Method | load |
Load the pickled session from a file. |
Method | save |
Pickle the session and save it into a file. |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | pickle |
Undocumented |
Instance Variable | directory |
Undocumented |
Method | _make |
Build the filename from the session ID. |
Inherited from SessionStore
:
Method | has |
Return true if the session exists in the store, else false. |
Method | iter |
Return an iterable of (id, session) for all sessions in the store. |
Method | setup |
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. |
Delete all sessions that have not been modified for N minutes.
This method is never called by the session manager. It's for your application maintenance program; e.g., a daily cron job.
DirectorySessionStore.delete_old_sessions returns a tuple:
(n_deleted, n_remaining)