durusmail: quixote-users: Interface for session persistence
Interface for session persistence
2002-05-18
2002-05-18
2002-05-19
2002-05-20
2002-05-20
2002-05-20
2002-05-20
2002-05-20
2002-05-21
2002-05-24
2002-05-24
2002-05-24
2002-05-18
2002-05-20
2002-05-20
Interface for session persistence
Jonathan Corbet
2002-05-19
> Can anyone think
> of interface changes that would make this even easier?  Can you think of
> how you would work your persistence mechanism into this interface so you
> can save your application's session data in your preferred way?

It looks OK, I could move my code over to that interface.

I do wonder about the SessionManager.sessions variable.  Is there a reason
for it to exist now that lookup_session is there?  In my setup, sessions
(and the session namespace) can change behind the back of any individual
server process, so caching things within any one process will not work.  I
got around that by making "sessions" be a magic mapping that goes to the
persistent store.  It seems I could get around that now - *if* "sessions"
is not being used in other places.

For me, it was worthwhile to add an is_dirty() flag to the session object,
and only flush it if something has changed - a relatively rare occurrence
in my setup.

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net


reply