WebKit.SessionFileStore | index /usr/local/share/webware/WebKit/SessionFileStore.py

`Session store using files.`

Modules

``

os | threading |  |

Classes

``

WebKit.SessionStore.SessionStore(__builtin__.object)
  SessionFileStore

class SessionFileStore(WebKit.SessionStore.SessionStore)
`` | `A session file store. Stores the sessions on disk in the Sessions/ directory, one file per session. This is useful for various situations: 1. Using the OneShot adapter 2. Doing development (so that restarting the app server won't lose session information). 3. Fault tolerance 4. Clustering Note that the last two are not yet supported by WebKit.`

Method resolution order:
  SessionFileStore
  WebKit.SessionStore.SessionStore
  __builtin__.object

Methods defined here:

__contains__(self, key)
  `Check whether the session store has a file for the given key.`

__delitem__(self, key)
  `Delete a session item, removing its session file.`

__getitem__(self, key)
  `Get a session item, loading it from the session file.`

__init__(self, app, restoreFiles=True)
  `Initialize the session file store.
  If restoreFiles is true, and sessions have been saved to file,
  the store will be initialized from these files.`

__iter__(self)
  `Return an iterator over the stored session keys.`

__len__(self)
  `Return the number of sessions in the store.`

__setitem__(self, key, value)
  `Set a session item, saving it to a session file.`

clear(self)
  `Clear the session file store, removing all of the session files.`

filenameForKey(self, key)
  `Return the name of the session file for the given key.`

keys(self)
  `Return a list with the keys of all the stored sessions.`

pop(self, key, default=<class 'MiscUtils.NoDefault'>)
  `Return value if key available, else default (also remove key).`

removeKey(self, key)
  `Remove the session file for the given key.`

setdefault(self, key, default=None)
  `Return value if key available, else default (also setting it).`

storeAllSessions(self)
  `Permanently save all sessions in the store.`

storeSession(self, session)
  `Save session, writing it to the session file now.`

Methods inherited from WebKit.SessionStore.SessionStore:

__repr__(self)
  `Return string representation of the store like a dictionary.`

application(self)
  `Return the application owning the session store.`

cleanStaleSessions(self, task=None)
  `Clean stale sessions.
  Called by the Application to tell this store to clean out all
  sessions that have exceeded their lifetime.`

decoder(self)
  `Return the value deserializer for the store.`

encoder(self)
  `Return the value serializer for the store.`

get(self, key, default=None)
  `Return value if key available, else return the default.`

has_key(self, key)
  `Check whether the session store has a given key.`

items(self)
  `Return a list with the (key, value) pairs for all sessions.`

iteritems(self)
  `Return an iterator over the (key, value) pairs for all sessions.`

iterkeys(self)
  `Return an iterator over the stored session keys.`

itervalues(self)
  `Return an iterator over the stored values of all sessions.`

setEncoderDecoder(self, encoder, decoder)
  `Set the serializer and deserializer for the store.`

values(self)
  `Return a list with the values of all stored sessions.`

Data descriptors inherited from WebKit.SessionStore.SessionStore:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`