.net - "CacheProfile" in MVC 5 -
I am starting at MVC and I have a project to convert from MVC2 to the latest version of MVC. I read reading some books on MVC 4, so I started to understand the main mechanism
However, when changing my MVC 2 solution, I have a problem with a feature:. OutputCache . By example
[OutputCache (CacheProfile = "ProductImage")] Public ActionResult GetImage (Guid elementId, integer imgtype) In Web.Config I have "caching> outputCacheSettings & gt; outputCacheProfiles>":
And the output received the following exception:
For Outputs Child OutputCacheAttribute only supports Duration, VaryByCustom, and VaryByParam values. Please do not set CacheProfile, Location, NoStore, SqlDependency, VaryByContentEncoding, or VaryByHeader values for child tasks.
As I understood, the problem appears with only child actions.
- Is there another way to create a cache profile in the latest MVC?
- Is there any way to recognize that the action is only to change one child action?
- See About Hull
[DonutOutput Cache ...
Comments
Post a Comment