我在web.config
中添加了以下内容<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
但我没有看到响应标头过期。我应该做其他任何改变吗?
答案 0 :(得分:1)
我会尝试两件事来调试。首先,我将cacheControlCustom从private
更改为public
<location path="Content">
<system.webServer>
<staticContent>
<clientCache
cacheControlCustom="public"
cacheControlMode="UseMaxAge"
cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
如果这不起作用,请检查覆盖缓存的路径的位置。你的例子没有显示那部分。
最后,尝试通过以下方式解锁机器配置的StaticContent部分:
appcmd unlock config /section:staticContent
以下链接包含一些其他有用信息Client Cache。