[mod_python] Sesssion Management Questions

Feghhi, Jalil JFeghhi at visa.com
Mon Apr 25 11:36:44 EDT 2005


I am trying to move my session management from PSP to python (.py) and
have come across a few issues/questions: 

- When I create a new session, do I need to call load and/or save after
creation?
- I assume each time I update the session, I need to do a load and then
a save. Is that correct?
- I assume each time I read from session, I need to do a load. Is that
right?
- Do I need to worry about lock/unlocking?

(FYI: I am using Apache in pre-fork mode so I get one process for each
request, in case that impacts the way I need to do session handling and
what should I do regarding the above questions.)

One issue I had with using session in PSP code what that I could not set
the session timeout after declaring a session variable? I got an error
to the effect the operation is not allowed after header are sent? Is
that a limitation of using session object in psp code or there are ways
to do this?


Regards,

-Jalil






More information about the Mod_python mailing list