Article Options
Premium Sponsor
Premium Sponsor

 »  Home  »  .NET Framework  »  Advanced Caching Techniques in ASP.NET 2.0  »  Conclusion
 »  Home  »  Data Programming  »  ADO.NET  »  Advanced Caching Techniques in ASP.NET 2.0  »  Conclusion
 »  Home  »  Data Programming  »  SQL Server  »  Advanced Caching Techniques in ASP.NET 2.0  »  Conclusion
 »  Home  »  Data Programming  »  XML  »  Advanced Caching Techniques in ASP.NET 2.0  »  Conclusion
 »  Home  »  Visual Studio 2005  »  Advanced Caching Techniques in ASP.NET 2.0  »  Conclusion
 »  Home  »  Web Development  »  ASP.NET  »  Advanced Caching Techniques in ASP.NET 2.0  »  Conclusion
Advanced Caching Techniques in ASP.NET 2.0
by Sandeep Joshi | Published  05/05/2006 | .NET Framework ADO.NET SQL Server XML Visual Studio 2005 ASP.NET | Rating:
Sandeep Joshi
Sandeep is a masters graduate in Information Technology. He is having expert hands on Microsoft.NET Technologies as well as J2EE Technology. He has been awarded Microsoft Most valuable Professional twice during his 6 years IT career. He is a well known community speaker. He is also been awarded Microsoft Community Star India in 2002. As a UG Leader he had taken session at Indore .NET User group and is also involved in conducting seminars in Colleges of Indore[India] for .NET awareness. He also runs an educational-portal(www.logicwala.8k.com) with more than 12000 users. His favorite hobbies include playing cricket, singing gajals and writing poems. His mentor is Mr. Amitabh Bachachan besides his Father. Sandeep can be contacted at sandeep_mvp@yahoo.com  

View all articles by Sandeep Joshi...
Conclusion
 

Conclusion

For enterprise application, where data retrieval is a big issue, caching can enhance the performance in a dramatic fashion. With the launch of ASP.NET 2.0 framework, significant changes have been made to the caching mechanism to reduce the programmer’s headache.

The new DataSource controls include properties that make it easy to cache database data in memory without writing any code. The new support for SQL Cache Invalidation enables you to automatically reload database data in the cache whenever the data is modified in the underlying database. This feature provides you with all the performance benefits of caching, without the worries of the database changes.

How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent
Tell us why you rated this way (optional):

Article Rating
The average rating is: No-one else has rated this article yet.

Article rating:4.33333333333333 out of 5
 18 people have rated this page
Article Score23196
Comments    Submit Comment

Comment #1  (Posted by an unknown user on 05/10/2006)
Rating
Hi Sandeep,

Your article was really nice and neat. But a query on the performance side for caching.

Queries:
1. "SQL Cache Invalidation works by constantly polling the database to check for changes", isn't this a hit on the performance itself. Agreed that it wont bring tons of data but querying the database in the enterprise environment will itself be a major hit on performance. Can we configure this querying time?
2. I am not sure how database works internally but still the query. Does the database have to do extra processing to keep the track of all the changes done for the cache or irrespective of it? If yes, that will be another performance hit. If not then much better.

My email id is melvyn_taraporewalla@yahoo.com. I will await your response.

Regards,

Melvyn Taraporewalla
 
Comment #2  (Posted by rav on 05/11/2006)
Rating
thanks for sharing
 
Comment #3  (Posted by an unknown user on 05/12/2006)
Rating
Should not be labeled as an advanced article.
 
Comment #4  (Posted by Vibhu on 05/17/2006)
Rating
Pretty nice article
 
Comment #5  (Posted by rosekiller on 05/21/2006)
Rating
hi, man. I like it.
 
Comment #6  (Posted by Sandeep Joshi on 06/28/2006)
Rating
Answers to the Queries:
1. "SQL Cache Invalidation works by constantly polling the database to check for changes", isn't this a hit on the performance itself. Agreed that it wont bring tons of data but querying the database in the enterprise environment will itself be a major hit on performance. Can we configure this querying time?
RE: In SQL Cache Invalidation, the polling happen only when you use SQL Server 2000 or SQL Server 7.It is a continuous thread which is run by ASP.NET to poll the database. When you enable Polling for SQL Database, you can also configure the polling time in the web.config file.

For SQL Server 2005, the polling doesn't happen at all. It uses the SQL Server 'Service Broker' object to do all the invalidation magic. Above all there is no manual steps required to enable the notification for SQL server 2005 database.


2. I am not sure how database works internally but still the query. Does the database have to do extra processing to keep the track of all the changes done for the cache or irrespective of it?

Re: When you enable the SQL cache invalidation in SQL server 2000 for a database, it will create a new table(AspNet_SQLCacheTablesForChangeNotification) in that database. This table will contain 3 columns(tableName,notificationCreated abd ChangeId). Whenever a row is added/deleted/modified in a table for which you have enabled the notification, a new row will be added to the table.
This is the table which is monitored/polled by ASP.NET process for tracking the changes. So no additional work and it is handled smartly.

 
Comment #7  (Posted by an unknown user on 11/29/2006)
Rating
It’s really excellent
 
Comment #8  (Posted by an unknown user on 01/14/2007)
Rating
Well only theory,it would have be better if any interesting sample application demo included in this article.
 
Comment #9  (Posted by an unknown user on 03/02/2007)
Rating
Good Work, and yes use cache in your favor programatically is advanced ^^
 
Comment #10  (Posted by jhansi on 03/13/2007)
Rating
Article is good. If it has one example on fragment caching , it would be excellent.
 
Comment #11  (Posted by dami on 04/05/2007)
Rating
nice article. if you explained with proper program examples it would have been much better.
 
Comment #12  (Posted by an unknown user on 04/24/2007)
Rating
HI Sandeep,

I created a service broker which I am using for a queue and now I need a notification in my application whenever data is inserted in the queue. So can we do this with caching concept? (I am using sqlserver 2005 and asp.net 2005 in my application.)

My email ID is shaileshag2002@gmail.com I will await for your response.

Thanks,
Shailesh
 
Comment #13  (Posted by an unknown user on 05/03/2007)
Rating
Hi,
How can we do similar functionality with Oracle Database.
Thanks in advance
Regards
sridhar
 
Comment #14  (Posted by an unknown user on 09/30/2007)
Rating
good
 
Sponsored Links