5.2.1 pse.plugins.application -- persistent, per server application data

The pse.plugins.application module can be used to store information between requests on a per server basis. This module can be used to track persistent database connections or anything other data you want to reuse for every request.

Application data can be stored in a global namespace or a namespace of your choosing to prevent accidental name collision in different parts of the application or between different applications. Namespace identifiers can be any hashable type for the purpose of dictionary keys. The only restriction is that namespaces cannot begin with the underscore character ("_").

Any data stored using the pse.plugins.application module is specific to a particular apache child process and is lost when the process dies, either because it has server the maximum number of requests, apache itself was shut down or restarted, or the process died from a segfault. Therefore, you cannot depend on the fact that every request to the application will see the same data, unless apache is configured to use only one child process.

new( [namespace])
Return a new application namespace dictionary. If namespace is specified, a persistent dictionary is returned. If the namespace has already previously been created, then that same dictionary will be returned, otherwise an empty dictionary will be returned.

If namespace is omitted, then the global application namespace will be returned.

delete( namespace)
Delete the specified namespace. If the namespace did not previously exist, then the delete function will silently do nothing. If you don't specify the namespace, the global namespace will be cleared. This is the same as calling the clear method on the global namespace dictionary itself.