微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

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中启用甜甜圈缓存.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐