Asp.net mvc MVC3。缓存子操作的配置文件。它';现在不可能了,对吗?
据我所知,如果操作作为子操作调用,则不可能为OutputCacheAttribute设置缓存配置文件 因为System.Web.Mvc.OutputCacheAttribute.ValidateChildActionConfiguration()中的代码 是否有其他方法可以设置缓存配置文件Asp.net mvc MVC3。缓存子操作的配置文件。它';现在不可能了,对吗?,asp.net-mvc,caching,attributes,cacheprofile,Asp.net Mvc,Caching,Attributes,Cacheprofile,据我所知,如果操作作为子操作调用,则不可能为OutputCacheAttribute设置缓存配置文件 因为System.Web.Mvc.OutputCacheAttribute.ValidateChildActionConfiguration()中的代码 是否有其他方法可以设置缓存配置文件 if (!String.IsNullOrWhiteSpace(CacheProfile) || !String.IsNullOrWhiteSpace(SqlDependency) |
if (!String.IsNullOrWhiteSpace(CacheProfile) ||
!String.IsNullOrWhiteSpace(SqlDependency) ||
!String.IsNullOrWhiteSpace(VaryByContentEncoding) ||
!String.IsNullOrWhiteSpace(VaryByHeader) ||
_locationWasSet || _noStoreWasSet) {
throw new InvalidOperationException(MvcResources.OutputCacheAttribute_ChildAction_UnsupportedSetting);
}