.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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -