[mod_python] Date persistence accross connections.

Gregory Bond gnb at itga.com.au
Thu Feb 13 08:21:18 EST 2003


skremer at q.cis.uoguelph.ca said:
> So should I be able to just store a variable in my local namespace and
>  then return to it the next time I make an http connection?  Or might
> my  next connect be executing python in a different namespace for some
>  reason?!? 

It might work in certain restricted circumstances, but it's likely to be 
unreliable.  You can't know when Apache will decide it's time for a new 
process.  You can't know when the apache process gets re-configured or 
restarted.  You can't know when another unrelated session to the same 
application will begin. 

You would be much better off to look at some of the session management tools
that work with mod_python and handle the problem properly.  I use Albatross
(http://www.object-craft.com.au/projects/albatross/) but that does a whole 
heap more than just session management.  Others have recommended PSO 
(http://www.scriptfoundry.com/modules/pso/).

Greg.






More information about the Mod_python mailing list