This new YouTube video demonstrated the power of EdgeCaching in the GAE architecture, and in this particular paragraph of the video they demonstrate how easy it is to use leverage: http://www.youtube.com/watch?v=QJp6hmASstQ#t=11m12
Unfortunately, this is not so simple ...
I am looking to enable edge caching using the webapp2 infrastructure provided by Google.
I'm calling:
self.response.pragma = 'Public' self.response.cache_expires(300)
but it seems to be redefined by something else.
The title I get is:
HTTP/1.1 200 OK Pragma: Public Cache-Control: max-age=300, no-cache Expires: Sat, 23 Feb 2013 19:15:11 GMT Content-Type: application/json; charset=utf-8 Content-Encoding: gzip X-AppEngine-Estimated-CPM-US-Dollars: $0.000085 X-AppEngine-Resource-Usage: ms=39 cpu_ms=64 Date: Sat, 23 Feb 2013 19:10:11 GMT Pragma: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Cache-Control: no-cache, must-revalidate Vary: Accept-Encoding Server: Google Frontend Content-Length: 600
I use top level ndb:
app = ndb.toplevel(webapp2.WSGIApplication(...
I tried the technique described here, but they don't seem to apply to webapp2: http://code.google.com/p/googleappengine/issues/detail?id=2258#c14
I also looked at this post: https://groups.google.com/d/topic/webapp2/NmHXoZZSVvo/discussion
I tried to install everything manually without success. Something overrides the cache settings.
Is there any way to make it work with webapp2? Any other option is welcome.
EDIT: I am using the URL with the version prefix: http://version.appname.appspot.com , and this is probably the cause of my problem.
source share