WAI
Status Update
Comments
jr...@google.com <jr...@google.com> #2
Hi, the presence of the "X-AppEngine" headers indicates that the requesting user agent was logged in as an administrator. When these headers are present, App Engine will suppress caching on the response, to keep these headers from being cached and served to other users.
Responses for non-administrator users shouldn't have X-AppEngine headers, and shouldn't trigger cache suppression.
Something else to look out for: responses with a Set-Cookie header will be marked as not cacheable by a shared cache, since the cookie may contain a session id or other user-specific information.
Cheers,
John
Responses for non-administrator users shouldn't have X-AppEngine headers, and shouldn't trigger cache suppression.
Something else to look out for: responses with a Set-Cookie header will be marked as not cacheable by a shared cache, since the cookie may contain a session id or other user-specific information.
Cheers,
John
[Deleted User] <[Deleted User]> #3
[Comment deleted]
sp...@proton.me <sp...@proton.me> #4
Ahh, thanks! I never thought to test with a different account (my software is still in development)! I just tried using another account and it responds as expected. Feel free to resolve this issue, and Much Thanks! :)
jr...@google.com <jr...@google.com>
ni...@gmail.com <ni...@gmail.com> #5
It would be absolutely delightful if this information could make it into the documentation, somewhere like {Go, Python, Java}/Configuration/App Config/Static Cache Expiration.
I've spent hours googling for it and messing around with app.yaml until I found this explanation.
I've spent hours googling for it and messing around with app.yaml until I found this explanation.
je...@gmail.com <je...@gmail.com> #6
I had the same issue as Nikita. Better docs please.
Description
<static-files>
<include path="/style/**" expiration="7d" />
</static-files>
GAE at first returns the expected Expires and Cache-Control headers (as tested via 'livehttpheaders'):
GET /style/default.css HTTP/1.1
Host:
HTTP/1.1 200 OK
Etag: "qJVTpA"
Date: Wed, 05 Dec 2012 19:11:24 GMT
Expires: Wed, 12 Dec 2012 19:11:24 GMT
Cache-Control: public, max-age=604800
Content-Type: text/css
Server: Google Frontend
Transfer-Encoding: chunked
But once you login to the app and establish a session:
GET /style/default.css HTTP/1.1
Host:
Cookie: JSESSIONID=XXX...; ACSID=YYY...
HTTP/1.1 200 OK
Etag: "qJVTpA"
Date: Wed, 05 Dec 2012 19:11:11 GMT, Wed, 05 Dec 2012 19:11:11 GMT
Expires: Wed, 12 Dec 2012 19:11:11 GMT, Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: public, max-age=604800, no-cache, must-revalidate
X-AppEngine-Estimated-CPM-US-Dollars: $0.000000
X-AppEngine-Resource-Usage: ms=44 cpu_ms=0
Pragma: no-cache
Content-Type: text/css
Server: Google Frontend
Transfer-Encoding: chunked
Note the Date/Expires/Cache-Control headers, where it appears as though there were multiple values for each header name added to the response, which were then merged.
Most problematic is the Cache-Control: no-cache, must-revalidate, as my app has 35+ static files linked to each page for a variety of Javascript and CSS frameworks. Everything is cached and works fine, as long as the user isn't logged in - but if they are, all those repeated requests (even returning Not-Modified as they do) basically brings everything to a grinding halt :(
Please fix appengine to always honour the specified expiration - if I wanted 'no-cache' or 'must-revalidate', I would have specified "0s" instead of "7d" for those resources.
Much Thanks.