Take Advantage of ASP.NET 2.0's Data Caching Techniques, Part 2
The second half of this two-part article looks at ASP.NET 2.0's new SQL cache invalidation support, and shows you how to use the Caching API to speed up your ASP.NET applications.
by Alex Homer
April 6, 2005
ne of the major advances in ASP.NET 2.0 caching is support for SQL cache invalidation. This feature lets you retrieve or generate a rowset, usually as a DataSet or DataTable, and then hang on to it until the original source data changes. That removes the balancing act formerly required to refresh the data (invalidate the cached rowset) regularly enough to see recently updated values in the data source, yet still hang on to each cached copy long enough to get the required reduction in resource usage and retrieval time when reconstructing the rowset.
Now, with SQL Server versions 7.0, 2000 or 2005, you simply set up a dependency for the database and table(s) you are using, fetch and cache the rowset, and then keep using the cached copy until the database informs your application that the source data has changed. This can obviously provide a huge performance boost, with a corresponding reduction in response times and database/server resource usage.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!