Output Caching to Enhance Web Site Performance in .NET

364 Points
152 Posts

Output Caching to Enhance Web Site Performance in .NET

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

Share:   fb twitter linkedin
Rahul Maurya
Rahul M...
1172 Points
211 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