SessionMemoryStore

Session store in memory.

class SessionMemoryStore.SessionMemoryStore(app, restoreFiles=None)

Bases: SessionStore

Stores the session in memory as a dictionary.

This is fast and secure when you have one, persistent application instance.

__init__(app, restoreFiles=None)

Initialize the session memory 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 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.

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.

storeSession(session)

Save already potentially changed session in the store.

values()

Return a list with the values of all stored sessions.