Duration: 18 minutes
Summary: In this video, we start our discussion on caching in ASP.Net. We know that the database operations are usually the slowest. So instead of connecting to the database on every page request to read the data, we can cache that data in the server memory and speed up our web site tremendously. There are different ways of caching pages: we can cache the whole page, or do partial caching (because part of the page is dynamic). With the OutputCache directive on the top of the page, there are many attributes that we can set as far as caching is concerned. We can specify the direction (in seconds) for the page to stay in the cache. We can also use VaryByParam to specify a different version of the page to be cached depending on different parameters (the query string parameters and form parameters). There is also the VaryByControl, VaryByCustom, and VaryByHeader,
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET and Visual Studio 2010
Keyword: ASP.NET 4, Visual Studio 2010, Caching, VaryByParam, VaryByControl, VaryByHeader, VaryByCustom, Duration, DateTime.