我想使用 Google 应用引擎启用公共(public)缓存。我得到以下响应,当开始使用 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
我现在如何启用缓存?已经启用了吗?我还需要添加 future 过期 header 吗?如果是这样,如何设置过期 header ?感谢您的回答
最佳答案
是的,这会启用缓存 - 尽管您根本不应该自己设置过期 header ,除非它准确 - 只需设置 max-age,然后让缓存和/或浏览器确定到期日期。
关于python - 如何使用 GAE 启用缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5617322/