Introduction to ASP. NET 2.0 data cache

Source: Internet
Author: User
In ASP. NET 2.0, many new functions and controls are added. Among them, the data cache function has greatly changed compared with asp.net 1.1. As we all know, the data cache function is very important. We can put some data that remains unchanged for a period of time in the cache, so that we do not need to read the database every time, when you need the data again next time, it can be obtained directly from the cache, greatly enhancing the efficiency.
In asp.net 1.1, the data caching function has been well implemented, but there is a small problem, that is, if the data in the database changes, the cache cannot be updated within the specified time, but must wait until the cache expires. For example, if you use page caching for product details, such as prices, on a webpage, if you modify the information in the background, the user will not immediately see the information, it takes some time to see it. In some application scenarios, if you want to update the database, the changes in the cache can take effect immediately. In asp.net 1.1, it is relatively difficult to implement, in asp.net 2.0, this function can be conveniently implemented. This article will introduce the implementation of this function with. net Framework 2.0 beta and visual web developer express beta.
First, in asp.net 2.0, new cache functions are provided for SQL server 7/2000 and the SQL server 2005 (Yukon) to be released. This section focuses on the cache function for SQL server 7/2000. This new data cache function is called SqlCacheDependency. To implement this function, follow these steps:
1. Under the. net framework 2.0 installation directory
(Ntwinmicro.netframeworkv2.0.40607), start a command line tool called aspnet_regsql.exe, such:
Aspnet_regsql-S localhost

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.