Whats new in Caching mechanism in VS2010

I read a great post reagrading caching mechanism in VS2010 today.

Here is brief synopsis if you want to know more please follow this linkhttp://www.asp.net/learn/whitepapers/aspnet40/

In traditional way cached content will be stored in memory, which hampers performance of heavily trafficked servers
In ASP.Net 4.0 WE can configure output cache providers. Out put cache providers use any storage mechanism to persist HTML content,ie we can store in local memory, remote disks, cloud storage and distributed cache engines
In order to create custom output cache provider as we have to derive System.Web.Caching.OutputCacheProvider and also we need to configure in web.config file
By default in ASP.NET 4.0 all HTTP responses, rendered pages and controls use in-memory output cache, we can select output cache providers per control and per request.
If we are customizing output cache provider in the page levelwe need to specifiy provier name attribute in OutputCache directive at page directives
If we are customizing out put cache provider per request. we need override GetOutputCacheProviderName in Gloabl.asaxfile
We can cache the top10 pages of a site in memory, while caching pages that get lower traffic on disk

Popular Posts