App Caching on GAE

1 view
Skip to first unread message

Robin B

unread,
Jul 22, 2008, 7:06:26 PM7/22/08
to web2py Web Framework
Since appengine does not allow writing to the file system (*.pyc),
does that mean the application and views are reloaded on every request
in production?

It is possible to cache global variables on App Engine.

From the App Engine site:

"To cache a handler script, App Engine must be able to call main()
with no arguments. If the handler script does not define a main()
function, or the main() function requires arguments (that don't have
defaults), then App Engine loads and evaluates the entire script for
every request."

Even if the views were cached, do the /models/*.py get re-run every
request? Where should I put code that only needs to be run once? Or
should there be a boot/ or init/ directory for this boot
initialization stuff?

Thanks,

Robin
Reply all
Reply to author
Forward
0 new messages