Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent web2py from caching?

I'm working with web2py and for some reason web2py seems to fail to notice when code has changed in certain cases. I can't really narrow it down, but from time to time changes in the code are not reflected, web2py obviously has the old version cached somewhere.

The only thing that helps is quitting web2py and restarting it (i'm using the internal server).

Any hints ? Thank you !

like image 956
Joe Avatar asked May 15 '10 13:05

Joe


1 Answers

web2py does cache your code, except for Google App Engine (for speed). That is not the problem. If you you edit code in models, views or controllers, you see the effect immediately.

The problem may be modules; if you edit code in modules you will not see the effect immediately, unless you import them with local_import('module', reload=True), or by restarting web2py.

Is that is also not your problem, then your browser is caching something. Please bring up this question to the web2py mailing list as we can help more.

P.S. If you are using the latest web2py it no longer comes with cherrypy. The built-in web server is called Rocket.

like image 98
mdipierro Avatar answered Oct 11 '22 10:10

mdipierro