开发者

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 ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜