ASP.NET MVC Extensible Donut Caching brings donut caching to ASP.NET MVC 3 and later. The code allows you to cache all of your page apart from one or more Html.Actions which can be executed every request. Perfect for user specific content.
public abstract class AbstractProtocolController : Controller {
...
[DonutOutputCache(Duration = 300, VaryByParam = "id", Location = OutputCacheLocation.Server)]
public ActionResult Detail(int id)
{
...
}
...
}
This abstract controller class is implemented in two concrete classes in separate areas.
When I do a web request to the action in the first area and then to the other action in the second area the view from the first area is served from cache. A note the concrete classes have the same controllername, but this shouldn't be an issue since they are still in two different areas.
I have only tested this out with the current pre-release version on NuGet (MvcDonutCaching 1.3.1-rc1).
This abstract controller class is implemented in two concrete classes in separate areas. When I do a web request to the action in the first area and then to the other action in the second area the view from the first area is served from cache. A note the concrete classes have the same controllername, but this shouldn't be an issue since they are still in two different areas.
I have only tested this out with the current pre-release version on NuGet (MvcDonutCaching 1.3.1-rc1).