class documentation
class DirectorySessionStore(SessionStore):
Constructor: DirectorySessionStore(sessions_directory, create_directory)
Store sessions in individual files within a directory. The noqa in the definitions are because 'id' is a Python keyword (blame Quixote, not me!)
| Method | __init__ |
`__init__` takes a directory name, with an option to create it if it's not already there. |
| Method | __iter__ |
Return an iterator of all session IDs in the storage. In our case, the session id is just the file-name |
| Method | delete |
Delete all sessions that have not been modified for N minutes. |
| Method | delete |
Delete the session file. |
| Method | has |
Return true if the session exists in the store, else false. |
| Method | load |
Load the pickled session from a file if it exists, otherwise return None |
| Method | save |
Pickle the session and save it into a file. |
| Method | setup |
Nothing to do here: but a directory could be created, etc. |
| Method | transaction |
Called near the end of a failed request (i.e. a exception that was not a PublisherError was raised. |
| Method | transaction |
Called near the end of each successful request. Not called if there were any errors processing the request. |
| Method | transaction |
Called near the beginning of each request: after the HTTPRequest object has been built, but before we traverse the URL or call the callable object found by URL traversal. |
| Constant | SLEEPY |
Undocumented |
| Class Variable | is |
Undocumented |
| Class Variable | is |
Undocumented |
| Instance Variable | directory |
Undocumented |
| Method | _make |
Build the filename from the session ID. |
Return an iterator of all session IDs in the storage. In our case, the session id is just the file-name
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)
Called near the end of each successful request. Not called if there were any errors processing the request.