开发者

How to enable caching with GAE

开发者 https://www.devze.com 2023-02-23 05:38 出处:网络
I want to enable public caching with google app engine. I\'ve got the following response where performance significantly increased 开发者_开发百科when starting to use the Cache-Control:

I want to enable public caching with google app engine. I've got the following response where performance significantly increased 开发者_开发百科when starting to use the Cache-Control:

HTTP/1.0 200 OK =>
Cache-Control => public,max-age=86400
Content-Type => application/vnd.google-earth.kml+xml
Expires => Thu, 01 Dec 1994 16:00:00 GMT
Date => Sun, 10 Apr 2011 14:32:09 GMT
Server => Google Frontend

How can I now enable caching? Is it already enabled? Do I also need to add a future expires header? If so, how do I set the expires header? Thanks for any answer


Yes, this enables caching - though you shouldn't be setting an expires header yourself at all unless it's accurate - just set the max-age, and let the caches and/or browser to determine the expiry date.

0

精彩评论

暂无评论...
验证码 换一张
取 消