There are two ways to get the GAE SDK (the standalone GAE SDK vs Google Cloud SDK gcloud
). There are slight differences when the deploying the app using gcloud
. If you are using gcloud
, you can use gcloud app deploy ~/my_app/app.yaml
. The behaviour is different from using the old appcfg.py
. If you prefer using appcfg.py
, you will find that it is not available. It is because for some reasons, Google decided to hide it from the developer. However, the appcfg.py
is, in fact, installed in the directory google-cloud-sdk/platform/google_appengine/
. Other useful scripts such as bulkloader.py
are there as well.
Details
age
header whose value is the time (in seconds) since the response has been cached. For example, if the response has been cached for two minutes thus far, the response will include a header of age: 120
. If no age
header is being sent, it's a good sign that you haven't gotten Edge Cache to work yet. Additionally, when the response doesn't include an age
header, it means the request missed Edge Cache.age
header.Vary
header with the value Accept-Encoding
with some responses. See this documentation.Cache-Control
header to public if you also have a Set-Cookie
header present. App Engine will even change the value of the Cache-Control
header from public
to private
if there is a Set-Cookie
header. See here.How EdgeCache works
EdgeCache is a reverse proxy cache that stores data for a certain period of time, and returns it quickly upon seeing the same request as long as the cache is still valid.
Here is a diagram from this video from the App Engine team about how EdgeCache works:
The "Google Front End" data centers are located around the world and can store cached data to be returned quickly upon request without ever having to run any of your App Engine code (which runs on the "App Engine Front End").
See this StackOverflow answer for more information about reverse proxies in general.
Current Situation
Unfortunately, the current state of knowledge about GAE's EdgeCache is pretty bad. The extent of the documentation on this secretive feature can be found in this forum post (read it now!) from 2011 and the 24 seconds between 11:11 and 11:35 in this video from Google.
More Resources
Below is the list of more resources we've found pertaining to App Engine's EdgeCache feature:
The Users API allows:
Important elements into the view:
Import:
from google.appengine.api import users
User-object and methods:
user = users.get_current_user()
Note: the implementation of jinja2 is optional, but into the article is used to explaining the completely workflow.