SessionFileStore¶
Session store using files.
- class SessionFileStore.SessionFileStore(app, restoreFiles=None)¶
Bases:
SessionStore
A session file store.
Stores the sessions on disk in the Sessions/ directory, one file per session.
- __init__(app, restoreFiles=None)¶
Initialize the session file store.
If restoreFiles is true, and sessions have been saved to file, the store will be initialized from these files.
- application()¶
Return the application owning the session store.
- cleanStaleSessions(_task=None)¶
Clean stale sessions.
Called by the Application to tell this store to clean out all sessions that have exceeded their lifetime.
- clear()¶
Clear the session file store, removing all of the session files.
- decoder()¶
Return the value deserializer for the store.
- encoder()¶
Return the value serializer for the store.
- filenameForKey(key)¶
Return the name of the session file for the given key.
- get(key, default=None)¶
Return value if key available, else return the default.
- has_key(key)¶
Check whether the session store has a given key.
- items()¶
Return a list with the (key, value) pairs for all sessions.
- iteritems()¶
Return an iterator over the (key, value) pairs for all sessions.
- iterkeys()¶
Return an iterator over the stored session keys.
- itervalues()¶
Return an iterator over the stored values of all sessions.
- keys()¶
Return a list with the keys of all the stored sessions.
- pop(key, default=<class 'MiscUtils.NoDefault'>)¶
Return value if key available, else default (also remove key).
- removeKey(key)¶
Remove the session file for the given key.
- setEncoderDecoder(encoder, decoder)¶
Set the serializer and deserializer for the store.
- setdefault(key, default=None)¶
Return value if key available, else default (also setting it).
- storeAllSessions()¶
Permanently save all sessions in the store.
- storeSession(session)¶
Save session, writing it to the session file now.
- values()¶
Return a list with the values of all stored sessions.