[Zope] Preserving Settings during a user's session

Paul Everitt Paul@digicool.com
Wed, 24 Feb 1999 08:46:36 -0500


Jeff wrote:
> I'm trying to accomplish something and I can't figure out an 
> elegant way to
> do it.

A long, long time ago -- back around September -- the we had a
discussion about this in a pre-historical time known as Bobo.

At the time there was sufficient lobbying for a "Session" idea that Jim
Fulton actually agreed to change the currently-named Session idea (where
you do a lot of work in a private view then "make it live") to Version.

Unfortunately we never did the Session idea.
 
> I need to preserve variables, like State=CA or ID=5, 
> throughout a user's
> session, unless I specifically change them in a page (i.e. I 
> change ID=5 to
> ID=4).
> 
> I can think of two methods:
> a. Passing all the values in the link syntax for all page links:
>   <a href=page_name?ID=5&State=CA&Region=1&Tab=Guide>Link text</a>
> 
> b. Storing the values in cookies. I'd prefer not to use 
> cookies as this will
> be a public web site and some people have privacy concerns 
> about cookies.
> 
> Anybody got a better idea?

First, do you feel this is a general-purpose facility that Zope should
provide?  And no cheating just because *you* need it :^)
 
It appears that your requirement is:

Store some information associated with what a specific user is doing
during a specific interval of work.

Any solutions must:

a. Be specific to a single user.

b. Store information in a way that expires somehow, otherwise it doesn't
just accumulate.

c. Not give a performance hit.

The previous Bobo discussion centered on creating Session objects that
would exhibit themselves either as cookies or as pseudo-objects in the
URL.

--Paul