[Zope] Persistent login
Dieter Maurer
dieter@handshake.de
Wed, 10 Jul 2002 18:47:19 +0200
Thierry Florac writes:
> > ...
> > "request['AUTHENTICATED_USER']" is a complex object which cannot
> > be stored inside ZODB.
> ...
> I've finally decided to try the ZSession product, which can store
> complex objects like AuthenticatedUser. It seems to work as specified
> above...
Be very careful, when you store persistent objects in any cache (a
session belongs to this type)!
They have an implicit reference to a ZODB connection.
This reference is valid only during the current request.
You may get all sorts of weird errors when the object later
tries to use this reference.
I spend days to locate such an error. It appears as if Zope
were non-deterministically crashing, telling me that
"None" does not have attributes, oid being invalid
and objects being referenced from outside a connection...
Dieter