ASP.NET output cache demo (CSASPNETOutputCache)

This VC# sample demonstrates the usage of OutputCache in ASP.NET

C# (56.0 KB)
12,972 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Caching Profile
    2 Posts | Last post August 03, 2011
    • Can any one explain in brief what is the role of caching profile in output caching.
    • Hi,
      Output cache profile is used to provide different predefined cache strategies. For exmaple, you can change all cache time for a specified group of pages to another without change duration in every page(because you only need to change the duration of the certain profile in web.config)
      For definition(in web.config):
            <add name="Cache30Seconds" duration="30" 
              varyByParam="none" />
      For usage(in page head):
      <%@ OutputCache CacheProfile="Cache30Seconds" %>
      For more details:
      I hope this can be helpful.