I converted a google app handler script that uses Datastore operations
and memcache to also use app caching as described on:
http://code.google.com/appengine/docs/python/appcaching.html
However, on the first invocation of the handler script on the Mac SDK
I get a blank page. A single "GET / HTTP/1.1" 200" request registers
on the console, but there is a blank response to the browser. The
resulting web page is blank. A reload of the page is successful and
all subsequent operations are successful.
I also get a blank page on the live server after uploading the
handler script on first invocation (even after only adding a newline).
Generally, all subsequent invocations are successful. I have seen a
single instance of a subsequent invocation resulting in a blank page.
It seems like the first invocation of the handler on a given server
results in a blank page, with subsequent invocations being successful.
The global variables that I have are: a single compiled regular
expression and a few GqlQuery objects, which I bind() to new
parameters when I use them. If I remove the main() function to
eliminate app caching, the blank page response never happens and the
handler script runs with no errors. Turning app caching back on brings
back the blank response on the first load.
This is driving me batty. I can't seem to find anything relevant
through web and group searches.
Is there something I am missing? Does something special occur on first
invocation that could interact with my handler script?
Any suggestions are very appreciated.
thanks,
efless