[Zope] Using "Session" to store per-session data.

Paul Everitt paul@digicool.com
Mon, 13 Sep 1999 07:37:06 -0400


Tony McDonald wrote:
> A plug for my  *old* language, PHP3 and its session library PHPLIb.
> They did it using cookies and an SQL database, and I think that's the
> way to do it, rather than using the ZODB.
> The PHPLib library is at: http://phplib.netuse.de/index.php3

I wonder why you think the ZODB isn't the place to do this?

If it is because of the versioning issue:

1) You can create a special datastructure that doesn't version on every
commit, but instead perhaps every minute.  Think of it as halfway
between volatile and persistent.

2) One of these days we'll come out with a non-versioning Storage class,
plus allow people to mix Storages in the same process.

3) Then again, perhaps people could live with the 20 byte or so growth
on each Session commit.

--Paul