如何使用 GAE 启用缓存
我想使用谷歌应用程序引擎启用公共缓存。我收到以下响应,开始使用缓存控制时性能显着提高:
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
我现在如何启用缓存?已经启用了吗?我还需要添加未来过期标头吗?如果是这样,如何设置过期标头?感谢您的任何答复
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这会启用缓存 - 尽管您根本不应该自己设置过期标头,除非它是准确的 - 只需设置 max-age,并让缓存和/或浏览器确定到期日期。
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.