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

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....