ASP.NET MVC,Cache个人用户控件

时间:2021-07-09 16:48:39

How do I cache an individual user control with ASP.NET MVC? I also need the VaryByParam etc support that usually comes with ASPX Output Caching. I don't want to cache the entire action though, only one of my user controls in the view.

如何使用ASP.NET MVC缓存单个用户控件?我还需要通常随ASPX输出缓存提供的VaryByParam等支持。我不想缓存整个操作,只是在视图中只有一个用户控件。

An example would be nice :) Thank you!

一个例子会很好:)谢谢!

1 个解决方案

#1


Phil Haack has written good article about that , it's called dnout hole caching http://haacked.com/archive/2009/05/12/donut-hole-caching.aspx

菲尔·哈克(Phil Haack)撰写了一篇很好的文章,它被称为dnout hole caching http://haacked.com/archive/2009/05/12/donut-hole-caching.aspx

#1


Phil Haack has written good article about that , it's called dnout hole caching http://haacked.com/archive/2009/05/12/donut-hole-caching.aspx

菲尔·哈克(Phil Haack)撰写了一篇很好的文章,它被称为dnout hole caching http://haacked.com/archive/2009/05/12/donut-hole-caching.aspx