我在想,为了增加网站的速度来做一些缓存正在被包含的js文件的策略是否有意义?asp.net-mvc:javascript缓存
一个想法,我是做这样的事情:
[OutputCache(Location = OutputCacheLocation.Any, Duration = 3600)]
public JsController : Controller
public ActionResult JQuery()
{
//I would have a ascx with the entire jquery script inside
return View();
}
,并在的Site.Master:
<%=Html.RenderAction("JQuery","JsController");
任何原因jQuery不仅仅是一个静态文件? – balpha 2010-05-25 13:04:06
@balpha没有理由,我只是想使用OutputCache属性来缓存它的内容,不知道它是否有意义 – Omu 2010-05-25 13:16:15