SessionShelveStore¶
Session store using the shelve module.
- class SessionShelveStore.SessionShelveStore(app, restoreFiles=None, filename=None)¶
Bases:
SessionStore
A session store implemented with a shelve object.
To use this store, set SessionStore in Application.config to ‘Shelve’.
- __init__(app, restoreFiles=None, filename=None)¶
Initialize the session shelf.
If restoreFiles is true, existing shelve file(s) will be reused.
- application()¶
Return the application owning the session store.
- cleanStaleSessions(task=None)¶
Clean stale sessions.
- clear()¶
Clear the session store, removing all of its items.
- decoder()¶
Return the value deserializer for the store.
- encoder()¶
Return the value serializer for the store.
- 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.
- intervalSweep()¶
The session sweeper interval function.
- 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).
- 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.
Should be used (only) when the application server is shut down.
- storeSession(session)¶
Save potentially changed session in the store.
- values()¶
Return a list with the values of all stored sessions.