【发布时间】:2010-11-11 06:30:24
【问题描述】:
我刚刚开始在我的一些控制器操作上使用 OutputCache,但我并没有完全得到预期的响应。
我已将缓存时间设置为 5 分钟,并且 Expires 标头与 Last-Modified 标头相同,即发出请求的时间。
这是我目前得到的标题:
Date Thu, 16 Jul 2009 06:35:07 GMT
Server Microsoft-IIS/6.0
X-Powered-By ASP.NET
X-AspNet-Version 2.0.50727
X-AspNetMvc-Version 1.0
Content-Encoding gzip
Cache-Control public, max-age=300
Expires Thu, 16 Jul 2009 06:35:06 GMT
Last-Modified Thu, 16 Jul 2009 06:35:03 GMT
Vary *
Content-Type text/html; charset=utf-8
Content-Length 575
这是我期望的标题:
Date Thu, 16 Jul 2009 06:35:07 GMT
Server Microsoft-IIS/6.0
X-Powered-By ASP.NET
X-AspNet-Version 2.0.50727
X-AspNetMvc-Version 1.0
Content-Encoding gzip
Cache-Control public, max-age=300
Expires Thu, 16 Jul 2009 06:40:06 GMT
Last-Modified Thu, 16 Jul 2009 06:35:03 GMT
Vary *
Content-Type text/html; charset=utf-8
Content-Length 575
对为什么会这样做有什么想法吗?
干杯 安东尼
【问题讨论】:
标签: .net asp.net asp.net-mvc caching http-headers