MVC3. Cache profile for child action. it's impossible now, right?
As I understand it's impossible to setup cache profile for OutputCacheAttribute if action is invoked as a child action.
because of code inside System.Web.Mvc.OutputCacheAttribute.ValidateChildActionConfiguration()
if (!String.IsNullOrWhiteSpace(CacheProfile) ||
!String.IsNullOrWhiteSpace(SqlDependency) ||
!String.IsNullOrWhiteSpace(Va开发者_开发百科ryByContentEncoding) ||
!String.IsNullOrWhiteSpace(VaryByHeader) ||
_locationWasSet || _noStoreWasSet) {
throw new InvalidOperationException(MvcResources.OutputCacheAttribute_ChildAction_UnsupportedSetting);
}
Is any other ways exist to setup cache profile ?
精彩评论