rpinder
rpinder at usc.edu
Tue May 13 08:29:19 EST 2003
Hi all, I'm trying to plan the most efficient way to implement an apache project. And I have a really basic question about how mod_python (or any apache 'mod 'kind of framework, probably) works. I think i've read that a major advantage of mod_python is the fact you dont have to re'load the interpreter for each instance... but i'm wondering if this also equates to having a global, accessible, code space that python is operating in.... I'm following the examples in the documentation, and am using the 'handler' example, and have a python script with functions defined that do the work (there is a database connection happening with an Interbase server). What I"m trying to do is to have a dictionary created and available to all users - without having to re'create the dictionary for each apache visitor. I have a reason to NOT want to accomplish this using a database table - even though the dictionary is quite large, and requires a lot of overhead each time it's created. So my feeble question involves whether or not theres a way to do something like this with modpython, or is it impossible since each instance of the python script gets called in its entirety each time a request comes in from Apache. Thanks for any thoughts Rich
|