ASP.NET缓存捆绑 - 在这里多久? [英] ASP.NET Bundling caching - where and how long?

查看:100
本文介绍了ASP.NET缓存捆绑 - 在这里多久?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用新的捆绑和缩小功能,在一个ASP.NET应用程序解决性能问题,我注意到相当多的文件访问活动中捆绑使用的JavaScript文件。

While troubleshooting a performance issue in an ASP.NET app using the new bundling and minification features, and I noticed quite a bit of file activity accessing the javascript files used in the bundles.

有点在一个干净的MVC应用程序的测试后,我注意到的第一个请求,在那里我希望它读取文件,建立包后,并没有阅读有关后续请求的文件分钟左右。然后,它会再次阅读,然后去安静一分钟左右。

After a bit of testing on a clean MVC app, I noticed that after the first request, where I would expect it to read the files to build up the bundle, it didn't read the files on subsequent requests for about a minute or so. Then it would read them in again, and then go quiet for another minute or so.

显然有一些类型的缓存会在这里的,但在哪里捆内容得到缓存多长时间?我还可以控制该时间通过配置?

Obviously there's some kind of caching going on here, but where are the bundle contents getting cached and for how long? And can I control that amount of time through configuration?

推荐答案

原来我用的是整个MVC4堆栈的pre-发行版本,包括System.Web.Optimization。升级到RTM解决了这个问题。

Turns out I was using pre-release versions of the entire MVC4 stack, including System.Web.Optimization. Upgrading to RTM resolved the issue.

这篇关于ASP.NET缓存捆绑 - 在这里多久?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆