Extending ASP.NET Output Caching

Posted on Internet.com See other posts from Internet.com
Published on Wed, 16 Jun 2010 04:00:00 +0100 Indexed on 2010/06/16 15:23 UTC
Read the original article Hit count: 714

Filed under:
This ASP.NET tutorial shows how to customize ASP.NET 4's output caching functionality to save cached content to disk instead of memory.

© Internet.com or respective owner

Extending ASP.NET Output Caching

Posted on Internet.com See other posts from Internet.com
Published on Tue, 15 Jun 2010 04:00:00 +0100 Indexed on 2010/06/16 1:23 UTC
Read the original article Hit count: 714

Filed under:
One of the most sure-fire ways to improve a web application's performance is to employ caching. Caching takes some expensive operation and stores its results in a quickly accessible location. Since it's inception, ASP.NET has offered two flavors of caching:<ul><li><b>Output Caching</b> - caches the entire rendered markup of an ASP.NET page or <a href="http://www.asp101.com/lessons/usercontrols.asp">User Control</a> for a specified duration.</li><li><b>Data Caching</b> - a API for caching objects. Using the data cache you can write code to add, remove, and retrieve items from the cache.</li></ul>Until recently, the underlying functionality of these two caching mechanisms was fixed - both cached data

© Internet.com or respective owner

Extending ASP.NET Output Caching

Posted on 4 Guys From Rolla See other posts from 4 Guys From Rolla
Published on Wed, 16 Jun 2010 00:00:00 GMT Indexed on 2010/06/16 0:23 UTC
Read the original article Hit count: 716

Filed under:

One of the most sure-fire ways to improve a web application's performance is to employ caching. Caching takes some expensive operation and stores its results in a quickly accessible location. Since it's inception, ASP.NET has offered two flavors of caching:

  • Output Caching - caches the entire rendered markup of an ASP.NET page or User Control for a specified duration.
  • Data Caching - a API for caching objects. Using the data cache you can write code to add, remove, and retrieve items from the cache.

Until recently, the underlying functionality of these two caching mechanisms was fixed - both cached data in the web server's memory. This has its drawbacks. In some cases, developers may want to save output cache content to disk. When using the data cache you may want to cache items to the cloud or to a distributed caching architecture like memcached. The good news is that with ASP.NET 4 and the .NET Framework 4, the output caching and data caching options are now much more extensible. Both caching features are now based upon the provider model, meaning that you can create your own output cache and data cache providers (or download and use a third-party or open source provider) and plug them into a new or existing ASP.NET 4 application.

This article focuses on extending the output caching feature. We'll walk through how to create a custom output cache provider that caches a page or User Control's rendered output to disk (as opposed to memory) and then see how to plug the provider into an ASP.NET application. A complete working example, available in both VB and C#, is available for download at the end of this article. Read on to learn more!
Read More >

© 4 Guys From Rolla or respective owner

Extending ASP.NET Output Caching

Posted on Dot net Slackers See other posts from Dot net Slackers
Published on Wed, 16 Jun 2010 00:00:00 GMT Indexed on 2010/06/16 2:12 UTC
Read the original article Hit count: 714

Filed under:

One of the most sure-fire ways to improve a web application's performance is to employ caching. Caching takes some expensive operation and stores its results in a quickly accessible location. Since it's inception, ASP.NET has offered two flavors of caching:

  • Output Caching - caches the entire rendered markup of an ASP.NET page or User Control for a specified duration.
  • Data Caching - a API for caching objects. Using the data cache you can write code to add, remove, and retrieve items from the cache.

Until recently, the underlying functionality of these two caching mechanisms was fixed - both cached data in the web server's memory. This has its drawbacks. In some cases, developers may want to save output cache content to disk. When using the data cache you may want to cache items to the cloud or to a distributed caching architecture like memcached. The good news is that with ASP.NET 4 and the .NET Framework 4, the output caching and data caching options are now much more extensible. Both caching features are now based upon the provider model, meaning that you can create your own output cache and data cache providers (or download and use a third-party or open source provider) and plug them into a new or existing ASP.NET 4 application.

This article focuses on extending the output caching feature. We'll walk through how to create a custom output cache provider that caches a page or User Control's rendered output to disk (as opposed to memory) and then see how to plug the provider into an ASP.NET application. A complete working example, available in both VB and C#, is available for download at the end of this article. Read on to learn more!
Read More >

Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.



Email this Article

© Dot net Slackers or respective owner