Search code examples
pythonapachemod-pythoncherrypy

CherryPy + Apache2 - Response cached


I'm trying to develop a CherryPy based system. I'm actually using Apache2 web server + mod_python. I have the next problem:

When I update the code of my cherrypy app, refresh several times the browser, and the result is the same as before editing. It seems to be caching the response somewhere. When I restart the Apache server, the problem is solved, but refreshing the browser without restarting apache allways return the same response despite updating the source code of my app.

How can I get the last version of my CherryPy app without having to restart the web server each time I make an edition on it?

Thanks a lot!


Solution

  • It's not from the cherrypy docs (but from Django's Running a development server with mod_python), but maybe it helps:

    Just set MaxRequestsPerChild 1 in your httpd.conf file to force Apache to reload everything for each request.