EDN Admin
Well-known member
One of the most sure-fire ways to improve a web applications performance is to employ caching. Caching takes some expensive operation and stores its results
in a quickly accessible location. Since its inception, ASP.NET has offered two flavors of caching:
<b>Output Caching</b> - caches the entire rendered markup of an ASP.NET page or http://www.asp101.com/lessons/usercontrols.asp User Control for a
specified duration.<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. Until recently, the underlying functionality of these two caching mechanisms was fixed - both cached data in the web servers 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 http://memcached.org/ 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 http://www.4guysfromrolla.com/articles/101905-1.aspx 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. Well walk through how to create a custom output cache provider that caches a page or User Controls 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!
http://www.4guysfromrolla.com/articles/061610-1.aspx" class="readmore Read More >
View the full article
in a quickly accessible location. Since its inception, ASP.NET has offered two flavors of caching:
<b>Output Caching</b> - caches the entire rendered markup of an ASP.NET page or http://www.asp101.com/lessons/usercontrols.asp User Control for a
specified duration.<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. Until recently, the underlying functionality of these two caching mechanisms was fixed - both cached data in the web servers 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 http://memcached.org/ 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 http://www.4guysfromrolla.com/articles/101905-1.aspx 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. Well walk through how to create a custom output cache provider that caches a page or User Controls 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!
http://www.4guysfromrolla.com/articles/061610-1.aspx" class="readmore Read More >
View the full article