asp.net - IIS 默认是否缓存静态内容?

标签 asp.net caching iis iis-8

我正在研究 IIS 静态内容缓存的工作原理,我读得越多,就越感到困惑。

根据官方网站:

IIS automatically caches static content (such as HTML pages, images, and style sheets), since these types of content do not change from request to request. IIS also detects changes to the files when you make updates, and IIS flushes the cache as needed.

( http://www.iis.net/learn/manage/managing-performance-settings/configure-iis-7-output-caching )

但是,我不断找到有关如何为 iis 启用静态内容缓存的文章,如下所示: http://www.galcho.com/Blog/post/2008/02/27/IIS7-How-to-set-cache-control-for-static-content.aspx

那么iis默认是否缓存呢?我是否可能混淆了客户端和服务器端缓存?或者这样的文章已经过时了吗?

最佳答案

确实,IIS 默认缓存所有静态内容。被视为静态的文件类型的定义在 applicationHost.config 的 staticContent 部分下定义。如果您想覆盖策略或添加其他缓存类型,则需要添加/更改缓存/配置文件部分

关于asp.net - IIS 默认是否缓存静态内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24206504/

相关文章:

c# - IIS 不异步处理 Web Api 请求

javascript - 无法从asp.net中的java脚本隐藏标签和gridview

文件夹中的 ASP.NET 4.0 CSS 未缓存

html - 从网络文件共享提供文件时的浏览器缓存

asp.net - 404.17 错误 - 请求的内容似乎是脚本

iis - Mercurial IIS7 连接超时

asp.net - Page.IsValid 是如何工作的?

c# - 哪种设计模式适合您? ASP.NET 与 MySQL

asp.net - 无法防止 CheckBoxList 控件溢出

performance - 在 Travis CI 上缓存 docker 图像