Randomness (RE: [Zope-dev] CoreSessionTracking 0.8)

Chris McDonough chrism@digicool.com
Fri, 25 May 2001 04:15:23 -0400


Matt Hamilton wrote:
> Just to add myself to the list, I too am having problems with
> CoreSessionTracking :(  I am trying to find a test case for the problem,
> but I really can't replicate it.  It first I thought it was a cookie
> issue, but I am now noting down the session id generated and it stays the
> same even when my session data is lost, so I don't think it is that.
> 
> what I experience: I add an item to my shopping cart system and it shows
> up fine, all state is maintained.  If I however leave the page and not
> touch anything for a couple of minutes and then reload the page, the cart
> is now empty.  I know this is not that helpful, but I'm trying to tie it
> down myself!

Bummer.  How long is the session data container timeout set for?  Are
you sure you're just not exceeding the timeout?

> One thing that I do need to check though -- I am right in assuming I can
> insert complex objects into the SessionData right?  I have an 'Order'
> class that amongst other things has a dict containing instances of a
> 'Product' class.  The Order instance is stored in the SessionData.  As I
> said it appears to work fine and I can add and delete items from my Order
> fine.  Just it randomly looses it now and then.

Yes, any sort of object can go into session data... there are some
caveats documented in the helpfile (for instance, acquisition-wrapped
objects shouldn't be stored in session data), but otherwise anything's
game.

- C