Output Caching to Enhance Web Site Performance in .NET

Jak
Jak
Member
858 Points
132 Posts

Output Caching to Enhance Web Site Performance in .NET

Views: 8914
Total Answered: 1
Total Marked As Answer: 0
Posted On: 23-Jan-2015 12:32

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Teacher
4822 Points
23 Posts
         

To achieve better performance with ASP.NET one way to use output caching to reduce server workload. This is an optimization that reduces Web server response time.
Setting application-level caching enables you to change cache behavior from a single configuration file rather than editing the @ OutputCache directive of individual pages.

Add the following XML as a child of the system.web element:

<!-- caching section group --> <caching><outputCacheSettings><outputCacheProfiles><add name="WebAppCache1" enabled="true" duration="60"/> </outputCacheProfiles></outputCacheSettings></caching>

Change the @ OutputCache directive to read as follows:

<%@ OutputCache CacheProfile="WebAppCache1" VaryByParam="none" %>

 

Posted On: 23-Jan-2015 12:55
 Log In to Chat