Part of canonical.launchpad.webapp.pgsession View In Hierarchy
Implements interfaces: zope.session.interfaces.ISessionDataContainer
An ISessionDataContainer that stores data in PostgreSQL
PostgreSQL Schema:
CREATE TABLE SessionData (
client_id text PRIMARY KEY,
last_accessed timestamp with time zone
NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX sessiondata_last_accessed_idx ON SessionData(last_accessed);
CREATE TABLE SessionPkgData (
client_id text NOT NULL
REFERENCES SessionData(client_id) ON DELETE CASCADE,
product_id text NOT NULL,
key text NOT NULL,
pickle bytea NOT NULL,
CONSTRAINT sessiondata_key UNIQUE (client_id, product_id, key)
);
Removing expired data needs to be done out of band.
| Method | __getitem__ | See zope.session.interfaces.ISessionDataContainer |
| Method | __setitem__ | See zope.session.interfaces.ISessionDataContainer |
Inherited from PGSessionBase:
| Method | store | Undocumented |