加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

在ASP.NET MVC 3中可以使用甜甜圈缓存

发布时间:2020-12-15 22:50:26 所属栏目:asp.Net 来源:网络整理
导读:ASP.NET MVC 3(final)今天发布.当这个版本处于起步阶段时,我记得在codeplex上阅读了甜甜圈缓存正在被考虑.有人知道这是否成为V3?我似乎找不到任何信息,所以我只能(悲伤地)假设没有发生. 解决方法 是的. Scott Gu blogged about it: In addition to support
ASP.NET MVC 3(final)今天发布.当这个版本处于起步阶段时,我记得在codeplex上阅读了甜甜圈缓存正在被考虑.有人知道这是否成为V3?我似乎找不到任何信息,所以我只能(悲伤地)假设没有发生.

解决方法

是的. Scott Gu blogged about it:

In addition to supporting full page
output caching,ASP.NET MVC 3 also
supports partial-page caching – which
allows you to cache a region of output
and re-use it across multiple requests
or controllers. The [OutputCache]
behavior for partial-page caching was
updated with RC2 so that sub-content
cached entries are varied based on
input parameters as opposed to the URL
structure of the top-level request –
which makes caching scenarios both
easier and more powerful than the
behavior in the previous RC.

更新:

开箱即用的ASP.NET MVC 3中只支持甜甜圈孔缓存.这允许您使用子操作的[OutputCache]属性缓存页面的一小部分.不支持甜甜圈缓存,允许排除已缓存的页面部分. Response.WriteSubstitution不起作用,因为ASP.NET MVC 2.这是一个good article,它解释了ASP.NET MVC 3中可用的不同缓存选项.

更新2:

这是一个great article,它说明了如何在ASP.NET MVC 3中启用甜甜圈缓存.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读