摘要:
在MVC的站点中使用OutputCache实现缓存可以提高页面的打开速度,如:#if !DEBUG [OutputCache(VaryByHeader = "Content-Type", Duration = 600)]#endif public ActionResult Index() { return View(); } 如果每次想要更改缓存时间的话,则需要重新编译,但是可以通过在Web.Config添加配置节点来实现不编译更改缓存配置在<system.web>节点中添加如下配置<caching> ... 阅读全文