Asp .Net Mvc5 cache

  A: page caching

  What is page caching: By default, when the page will refresh request Controller in Action, when the interface is not bound to any such data refresh does not exist any sense, if the cached page, not Miya.

  In MVC characteristics provided OutputCacheAttribute support, the specific parameters are as follows: here only includes the most common ways of

  

 

  1. Set the time the cache Duration , does not require direct condition of the cache page 100 [refresh the page will not enter this Action]

  

 

  2. Conditions VaryByHeader (Header) cache, multi-criteria separated by semicolons [when VaryByHeader parameters unchanged, 100 refresh the page will not enter this Action]

   

  Note: Here Header parameters which specific conditions? Where I can see? Here's a simple way is to run your website development, F12 => XHR => Request Headers. As shown below:

  

 

  3. Condition the VaryByParam (parameter) cache, multi-parameter separated by semicolons

   

 

Guess you like

Origin www.cnblogs.com/pfwbloghome/p/10994391.html