此操作会修改Web.Config
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</configuration>
以上可见,不会有缓存,刷新都会重新加载。
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="2.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
以上操作,除了首次加载和动态页面,那么其他的就会走缓存,此处可以控制缓存的时间。