缓存与HTTP标头,Chrome,WSGI相关的问题

时间:2011-10-08 19:41:57

标签: python caching google-chrome webserver wsgi

我正在尝试缓存一些静态文件。我使用以下HTTP标头:

Date            Sat, 08 Oct 2011 19:34:30 GMT
Content-Length  770
Last-Modified   Wed, 05 Oct 2011 05:45:29 GMT
Server          WSGIServer/0.1 Python/2.7.1+
Content-Type    text/css
Cache-Control   public, max-age=3153600
Expires         Sun, 07 Oct 2012 19:34:30 GMT

但是,当我在调试WSGI服务器时通过Chrome访问该文件时,服务器仍在处理此文件。

我可能做错了什么?

1 个答案:

答案 0 :(得分:0)

这看起来非常类似于我刚刚问过here的问题。我似乎在Last-Modified和max-age标头之间进行交互。如果指定了Last-Modified标头,则忽略max-age。