In nowadays, you won't find any large scale application that doesn't make use of some kind of Caching technique. Caching application data can boost application performance and of course improves User interface experience. In ASP.NET there are several kind of caching techniques such as Web Page caching or specific data caching. In other words, you can cache and serve the whole Page itself or only particular application data. Caching though can be quite tricky, considering the fact that cached data can be out of date. This is actually the biggest problem you are called to solve when using caching. In this post, we are going to see how to cache data, retrieved from an SQL Server table and how to handle certain changes on this particular table. The scenario is this: We are going to create a GridView control in a ".aspx" Page and fill this control with some data retrieved from a Customers table using a Stored Procedure. We will cache these data and every time we reload the page, a cached copy will be returned. But what if a "Customers" record is updated or a new record is inserted in this table? Well, the ideal solution would be to let SQL Server itself, instantly notify the ASP.NET Application Server that the current cached copy is out of date and let him reload a fresh copy of the records into the cache. We have just described an automated Cache reloading technique. When the client requests again the page, he will receive the updated cached copy. Let's start.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, ASP.Net,SQL Server,Cashing SQL Server