On Thu, 18 Nov 1999, Anthony Baxter wrote:
Is it worth making this a more general piece of Zope? Right now, you
I think yes.
have to do a <dtml-call Session> at the start of the transaction to get the REQUEST.SESSION object created - it would be nice if this was done automagically (and done in a way that allowed you to slot in a different Session object if you wanted it...)
A few thoughts ... The session should not be created in every transation. You could achieve some automation by replacing REQUEST.SESSION with a function. Whenever you want to save or retrieve something you could do: <dtml-call "Session.set('a',2)">. Your method would then query the db (or whatever backend you use). Retrieval of data should also inlude caching so that session data are cached across transactions, if not modified. Also the default backend should be one that does not require additional components not shipped with standard Zope. SQL,bsddb etc should be optional backends. Just my morning thoughts ... Pavlos