Output Caching to Enhance Web Site Performance in .NET

Jak
Jak
Member
352 Points
151 Posts

Output Caching to Enhance Web Site Performance in .NET

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

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Moderator
1170 Points
210 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
banner

Blog

Active User (2)

 Log In to Chat