[mod_python] How can I turn off apparent caching of python code?

mike bayer mike_mp at zzzcomputing.com
Tue Aug 24 17:10:34 EDT 2004

> Ok, but I'm developing an entire application framework using
> the publisher handler.  I have things importing other things
> all over the place as I create my library modules.  In this
> position, am I relegated to repeatedly restarting apache as
> I solidify my classes?  I this what other people do?  Why is
> there so little discussion about this on the web?  Am I missing
> something?  Is my methodology flawed?

i do a lot of mod_perl development where you totally have to restart the
server when new code is put up.  Java servlets have similar issues for
library modules outside of the servlets themselves.  an apache restart is
just a HUP signal to the main process that is not generally noticeable by
end-users (since we do it all the time here with mod_perl).  I wouldnt say
its so unreasonable to have to restart an application when its internal
code is changed....since a mod_python application IS running in the same
application space as apache.

if you are developing in an environment where you have limited access to
the apache server, I'd look into doing something I am doing on a
mod_python project to account for a server that runs apache 1.3....I use
mod_proxy in the primary instance of Apache 1.3 to proxy mod_python
requests to an separate instance of Apache 2.0 that is listening on
localhost port 8100, and that is the application space where mod_python is
running.  you can restart it and reconfigure it freely without ever
touching the main apache server.  This model is analgous to doing java
servlets with an engine like tomcat, which runs as a separate service.

More information about the Mod_python mailing list