解决方法
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. @H_502_21@
更新:@H_502_21@
开箱即用的ASP.NET MVC 3中只支持甜甜圈孔缓存.这允许您使用子操作的[OutputCache]属性缓存页面的一小部分.不支持甜甜圈缓存,允许排除已缓存的页面部分. Response.WriteSubstitution不起作用,因为ASP.NET MVC 2.这是一个good article,它解释了ASP.NET MVC 3中可用的不同缓存选项.@H_502_21@
更新2:@H_502_21@
这是一个great article,它说明了如何在ASP.NET MVC 3中启用甜甜圈缓存.@H_502_21@