我是MVC的初学者,我有一个项目,从MVC2转换到最新版本的MVC.
我读了一些关于MVC 4的书,所以我开始理解主要的机制.
我读了一些关于MVC 4的书,所以我开始理解主要的机制.
但是,在转换我的MVC 2解决方案时,我遇到了一个属性问题:OutputCache.@H_404_4@
通过例如.我有多个这样的动作(属性可能会有所不同):@H_404_4@
[OutputCache(CacheProfile = "ProductImage")] public ActionResult GetImage(Guid elementId,int imgtype)
在Web.Config我有“缓存> outputCacheSettings> outputCacheProfiles>”:@H_404_4@
<add name="ProductImage" duration="5" varyByParam="elementId,imgtype" />
OutputCacheAttribute for child actions only supports Duration,
VaryByCustom,and VaryByParam values. Please do not set CacheProfile,
Location,NoStore,sqlDependency,VaryByContentEncoding,or
VaryByHeader values for child actions.@H_404_4@
据我所知,问题只出现在儿童行动中.@H_404_4@
>在最新的MVC中是否有另一种方法可以获得缓存配置文件?
>有没有办法确定该动作是否为子动作才能修改该动作?@H_404_4@